jmunozco jmunozco - 1 year ago 127
PHP Question

Attempted to load class "Doctrine_Core"

I'm trying to follow these steps:

Please, correct me if I am wrong. Firstly, I've created this class in AppBundle/Model route:

namespace AppBundle\Model;

class Item extends Doctrine_Record
public function setTableDefinition()
$this->hasColumn('name', 'string', 255);

public function setUp()

And then I use it in a controller like this:

$treeObject = Doctrine_Core::getTable('Category')->getTree();

I have two questions:
- Where do I have to define the Category table and how
- With this previous code I ran into this error: Attempted to load class "Doctrine_Core" from namespace "AppBundle\Controller\Admin

Any idea please? Thanks

Answer Source

Doctrine has it's bundle for Symfony, that allows to store all config data in YML. - it has "Tree extension" and it is what you're looking for.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download