Reputation: 93276
if i use Doctrine_Core::getTable('User')-> i will have no auto completion.
isnt it better to just use User:: for autocompletion?
and of course i have to define the methods static
what is the benefit with using getTable except that i can use a non static method?
Upvotes: 1
Views: 173
Reputation: 1382
If you just need auto completion, you can try the plugin here: http://www.symfony-project.org/plugins/sfDoctrineTableGetterPlugin
It builds a very light and fast auto-generated class and makes it possible to have code completion in all major IDE's like Eclipse PDT, Zend Studio, Net Beans.
Upvotes: 0
Reputation: 17977
Because User::
would need to call a static method, but the methods are all non-static, so that would be invalid code.
Read up on the singleton pattern.
Upvotes: 1