src/Db/Collection/CollectionAbstract.php
public function load(array $pArgs = array())
    {
        $select = new Select($this->_dbContainer);
        /*$select->addFields(array(
            ItemInterface::IDFIELD => true
        ));*/

        if (isset($pArgs[DbInterface::FILTER_LIMIT])) {
            $select->limit($pArgs[DbInterface::FILTER_LIMIT]);
        }

        if (isset($pArgs[DbInterface::FILTER_ORDER])) {
            $select->addOrder($pArgs[DbInterface::FILTER_ORDER]);
        } else {
            $select->addOrder(array(
                $this->_dbContainer . ItemInterface::PREFIX_SEPARATOR . ItemInterface::IDFIELD => Db::ORDER_DESC
            ));
        }

        if (isset($pArgs[DbInterface::FILTER_CONDITIONS]) and $pArgs[DbInterface::FILTER_CONDITIONS] instanceof Conditions) {
            $select->loadConditions($pArgs[DbInterface::FILTER_CONDITIONS]);
        }

        $select->find();

        $this->_count  = $select->count();
        $this->_select = $select;
        $this->_fetch();

        return $this;
    }
public function load(array $pArgs = array())
    {
        $select = new Select($this->_dbContainer);
        /*$select->addFields(array(
            ItemInterface::IDFIELD => true
        ));*/

        if (isset($pArgs[DbInterface::FILTER_LIMIT])) {
            $select->limit($pArgs[DbInterface::FILTER_LIMIT]);
        }

        if (isset($pArgs[DbInterface::FILTER_ORDER])) {
            $select->addOrder($pArgs[DbInterface::FILTER_ORDER]);
        } else {
            $select->addOrder(array(
                $this->_dbContainer . ItemInterface::PREFIX_SEPARATOR . ItemInterface::IDFIELD => Db::ORDER_DESC
            ));
        }

        if (isset($pArgs[DbInterface::FILTER_CONDITIONS]) and $pArgs[DbInterface::FILTER_CONDITIONS] instanceof Conditions) {
            $select->loadConditions($pArgs[DbInterface::FILTER_CONDITIONS]);
        }

        $select->find();

        $this->_count  = $select->count();
        $this->_select = $select;
        $this->_fetch();

        return $this;
    }
public function load ( array $ pArgs = array ( ) ) { $ select = new Select ( $ this -> _dbContainer ) ; /*$select->addFields(array(
            ItemInterface::IDFIELD => true
        ));*/ if ( isset ( $ pArgs [ DbInterface :: FILTER_LIMIT ] ) ) { $ select -> limit ( $ pArgs [ DbInterface :: FILTER_LIMIT ] ) ; } if ( isset ( $ pArgs [ DbInterface :: FILTER_ORDER ] ) ) { $ select -> addOrder ( $ pArgs [ DbInterface :: FILTER_ORDER ] ) ; } else { $ select -> addOrder ( array ( $ this -> _dbContainer . ItemInterface :: PREFIX_SEPARATOR . ItemInterface :: IDFIELD => Db :: ORDER_DESC ) ) ; } if ( isset ( $ pArgs [ DbInterface :: FILTER_CONDITIONS ] ) and $ pArgs [ DbInterface :: FILTER_CONDITIONS ] instanceof Conditions ) { $ select -> loadConditions ( $ pArgs [ DbInterface :: FILTER_CONDITIONS ] ) ; } $ select -> find ( ) ; $ this -> _count = $ select -> count ( ) ; $ this -> _select = $ select ; $ this -> _fetch ( ) ; return $ this ; }
Load all the collection's items with optional filters.

@param array $pArgs Optional arguments (Conditions, Limit, Order)
@return CollectionAbstract
Load all the collection s items with optional filters .