Phalcon\Mvc\Model\EagerLoading\Loader::execute PHP Method

execute() public method

public execute ( )
    public function execute()
    {
        foreach ($this->buildTree() as $eagerLoad) {
            $eagerLoad->load();
        }
        return $this;
    }

Usage Example

Example #1
0
 /**
  * https://github.com/stibiumz/phalcon.eager-loading/issues/4
  */
 public function testShouldLoadChildOfEmptyParentWithoutException()
 {
     // Has many -> Belongs to
     // Should be the same for Has many -> Has one
     $loader = new Loader(Robot::findFirstById(1), 'Bugs.Robot');
     $this->assertEquals($loader->execute()->get()->bugs, []);
 }
All Usage Examples Of Phalcon\Mvc\Model\EagerLoading\Loader::execute