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 just went through some MVC tutorials after checking this site out for a
I've been reading some tutorials on how to get started using Rails 2.0. (Time
I just wanted to do some tutorials in WPF but I find that the
Hi I am quite new to php but i have been following some tutorials
Can anyone reccomend some good tutorials for ext js and adobe air? The ones
Does anyone know of some good tutorials that explain how to use the JQuery
I’m looking for some samples/tutorials/general pointers in doing either of the following. 1) Create
I've been looking around for some decent tutorials on .NET remoting (old style MarshallByRef),
I am looking for some (preferably) online tutorials on making controls with 'Rich design-time
Preferred languages : C/C++, Java, and Ruby. I am looking for some helpful books/tutorials

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.