Pheasant\Relationships\Includer::loadCache PHP Method

loadCache() public method

public loadCache ( )
    public function loadCache()
    {
        $this->_cache = new ArrayCache();
        $ids = iterator_to_array($this->_query->select('DISTINCT ' . $this->_rel->local)->execute()->column());
        $relatedObjects = \Pheasant::instance()->finderFor($this->_rel->class)->find($this->_rel->class, new Criteria($this->_rel->foreign . '=?', array($ids)))->includes($this->_nested);
        foreach ($relatedObjects as $obj) {
            $this->_cache->add($obj);
        }
    }