src/Endpoint/Abstracts/AbstractCollectionEndpoint.php
public function at($index){
        $return = NULL;
        $index = intval($index);
        $data = $this->asArray();
        reset($data);
        if ($index < 0){
            $index += $this->length();
        }
        $c = 1;
        while ($c <= $index){
            next($data);
            $c++;
        }
        $return = current($data);
        $Model = $this->buildModel($return);
        if ($Model !== NULL){
            $return = $Model;
        }
        return $return;
    }
public function at($index){
        $return = NULL;
        $index = intval($index);
        $data = $this->asArray();
        reset($data);
        if ($index < 0){
            $index += $this->length();
        }
        $c = 1;
        while ($c <= $index){
            next($data);
            $c++;
        }
        $return = current($data);
        $Model = $this->buildModel($return);
        if ($Model !== NULL){
            $return = $Model;
        }
        return $return;
    }
public function at ( $ index ) { $ return = NULL ; $ index = intval ( $ index ) ; $ data = $ this -> asArray ( ) ; reset ( $ data ) ; if ( $ index < 0 ) { $ index += $ this -> length ( ) ; } $ c = 1 ; while ( $ c <= $ index ) { next ( $ data ) ; $ c ++ ; } $ return = current ( $ data ) ; $ Model = $ this -> buildModel ( $ return ) ; if ( $ Model !== NULL ) { $ return = $ Model ; } return $ return ; }
Get a model based on numerical index
@param int $index
@return array|ModelInterface
Get a model based on numerical index