0

I am using Zend FW 1.12 for a long time and what i do is define some static variables and some cms form parameters inside model file. Now, i'm publishing my current project to windows server with php 5.4.4 installed and having trouble accessing properties inside model class.

Model file:

class Articles extends Zend_Db_Table_Abstract{
    protected $_name = 'siteArticles';
    protected $_primary = 'ID'; 
    public $_cmsTitle = 'Articles';
}

Inside my controller file:

$mModule = new Articles();
echo $mModule->_cmsTitle;

returns:

Notice: Undefined property: Articles::$_cmsTitle in application\controllers\IndexController.php on line 118

I can still use fetchRow, fetchAll methods. But can't reach these params.

Any help would be appreciated

1 Answer 1

0

The problem was causing because there was an other class with the same name in one of the include_paths which was created by me 2 years ago and totally forgot it.

I was adding new include paths for classes and zend lib at the end of the current include paths which i don't have access so i didn't have any idea that same model files are still there.

1
  • 2
    Thats why you should follow PSR-0 rules ;)
    – Volvox
    Mar 17, 2014 at 10:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.