public function getResults()
    {
        $skip = ($this->page-1)*$this->limit;
        
        $cursor = $this->getCursor();
        $cursor->skip($skip);

        $results = array();
        $i = 0;

        while($cursor->valid() && $cursor->current() && $i++ < $this->limit) {

            $object = new $this->modelName();
            $object->writeAttributes($cursor->current());

            $pseudoCursor = new \stdClass();
            foreach ($object as $key => $value) {
                $pseudoCursor->$key = $value;
            }

            $results[] = $pseudoCursor;
            $cursor->skip();
        }

        return $results;
    }
public function getResults()
    {
        $skip = ($this->page-1)*$this->limit;
        
        $cursor = $this->getCursor();
        $cursor->skip($skip);

        $results = array();
        $i = 0;

        while($cursor->valid() && $cursor->current() && $i++ < $this->limit) {

            $object = new $this->modelName();
            $object->writeAttributes($cursor->current());

            $pseudoCursor = new \stdClass();
            foreach ($object as $key => $value) {
                $pseudoCursor->$key = $value;
            }

            $results[] = $pseudoCursor;
            $cursor->skip();
        }

        return $results;
    }
public function getResults ( ) { $ skip = ( $ this -> page - 1 ) * $ this -> limit ; $ cursor = $ this -> getCursor ( ) ; $ cursor -> skip ( $ skip ) ; $ results = array ( ) ; $ i = 0 ; while ( $ cursor -> valid ( ) && $ cursor -> current ( ) && $ i ++ < $ this -> limit ) { $ object = new $ this -> modelName ( ) ; $ object -> writeAttributes ( $ cursor -> current ( ) ) ; $ pseudoCursor = new \ stdClass ( ) ; foreach ( $ object as $ key => $ value ) { $ pseudoCursor -> $ key = $ value ; } $ results [ ] = $ pseudoCursor ; $ cursor -> skip ( ) ; } return $ results ; }
Returns results for current page

@return array
Returns results for current page