proper way of setting an attribute in Doctrine?

Posted by ajsie on Stack Overflow See other posts from Stack Overflow or by ajsie
Published on 2010-04-17T15:00:22Z Indexed on 2010/04/17 15:03 UTC
Read the original article Hit count: 188

Filed under:

in some tutorials they tell you to set up an attribute like this:

$manager = Doctrine_Manager::getInstance();
Doctrine_Manager::getInstance()->setAttribute(
    Doctrine::ATTR_AUTO_ACCESSOR_OVERRIDE, true);

and in the documentation it shows you this:

$manager = Doctrine_Manager::getInstance();
$manager->setAttribute(
    Doctrine::ATTR_AUTO_ACCESSOR_OVERRIDE, true);

i wonder which one i should use? isn't it the latter one? cause how can you set an attribute to a singleton class in the first one? isn't the second one more correct?

© Stack Overflow or respective owner

Related posts about doctrine