Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 744281
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T08:57:36+00:00 2026-05-14T08:57:36+00:00

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

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T08:57:37+00:00Added an answer on May 14, 2026 at 8:57 am

    Do you even understand the code you’re looking at?

    The first code is “wrong”. First it assigns Doctrine_Manager object $managger, and then this variable is not used.

    If you want to do more than one thing on Doctrine_Manager then it’s natural to get assign this reference to something that won’t mess up your code. If you want to do just one thing there is no need to use extra variable, in other words:

    Doctrine_Manger::getInstance()->setAttribte(...);
    

    or

    $manager = Doctrine_Manger::getInstance();
    $manager->setAttribute(...);
    $manager->setAttribute(...);
    $manager->doSth();
    $manager->blahblahblah();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know some of the tutorials for creating Xcode project templates, for example this
I have seen some tutorials on the subject, but they all go half into
I've been reading some tutorials on how to get started using Rails 2.0. (Time
I'm working through some tutorials and examples of java.util.concurrent package. Usually example authors put
I went through some tutorials on the State monad and I think I got
I am looking for some tutorials on how I can consume a .Net webservice
I'm reading some tutorials now about jQuery.. function creating,plugin creation etc. but these tutorials
Please point me to some tutorials or other explaining examples about how to register
I'm looking for some tutorials/resources/tips that will show me how to run applications via
according to some tutorials i read a while back, the const declaration makes a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.