New Zenner
- Join Date:
- Apr 2008
- Posts:
- 82
- Plugin Contributions:
- 0
Trying to autoload new class
Hello!
I am trying to add a new class to my shop but so far no luck. To be more specific I am trying to setup my zen to autoload mobile-detect class on all pages (https://github.com/serbanghita/Mobile-Detect). What I have done so far:
- added Mobile_Detect.php file to /includes/classes/observers
- created new file - config.mobile_detect.php in /includes/auto_loaders with:
<?php
$autoLoadConfig[200][] = array('autoType'=>'class',
'loadFile'=>'observers/Mobile_Detect.php');
$autoLoadConfig[200][] = array('autoType'=>'classInstantiate',
'className'=>'Mobile_Detect',
'objectName'=>'Mobile_Detect');
// eof
But whenever I am calling it a get an error - "PHP Fatal error: Call to a member function isMobile() on a non-object in" what can be missing or I am just too naive for it to work with zen?
Thank you for your help,
Dan!