public function createMovieCollection($data)
    {
        $collection = new ResultCollection();

        if (array_key_exists('results', $data)) {
            $data = $data['results'];
        }

        foreach ($data as $item) {
            $collection->add(null, $this->getMovieFactory()->create($item));
        }

        return $collection;
    }
public function createMovieCollection($data)
    {
        $collection = new ResultCollection();

        if (array_key_exists('results', $data)) {
            $data = $data['results'];
        }

        foreach ($data as $item) {
            $collection->add(null, $this->getMovieFactory()->create($item));
        }

        return $collection;
    }
public function createMovieCollection ( $ data ) { $ collection = new ResultCollection ( ) ; if ( array_key_exists ( 'results' , $ data ) ) { $ data = $ data [ 'results' ] ; } foreach ( $ data as $ item ) { $ collection -> add ( null , $ this -> getMovieFactory ( ) -> create ( $ item ) ) ; } return $ collection ; }
Create an collection of an array

@param $data
@return ResultCollection
Create an collection of an array