public function createListItem(array $data = [])
    {
        $listItem = new Account\ListItem();

        if (array_key_exists('poster_path', $data)) {
            $listItem->setPosterImage($this->getImageFactory()->createFromPath($data['poster_path'], 'poster_path'));
        }

        return $this->hydrate($listItem, $data);
    }
public function createListItem(array $data = [])
    {
        $listItem = new Account\ListItem();

        if (array_key_exists('poster_path', $data)) {
            $listItem->setPosterImage($this->getImageFactory()->createFromPath($data['poster_path'], 'poster_path'));
        }

        return $this->hydrate($listItem, $data);
    }
public function createListItem ( array $ data = [ ] ) { $ listItem = new Account \ ListItem ( ) ; if ( array_key_exists ( 'poster_path' , $ data ) ) { $ listItem -> setPosterImage ( $ this -> getImageFactory ( ) -> createFromPath ( $ data [ 'poster_path' ] , 'poster_path' ) ) ; } return $ this -> hydrate ( $ listItem , $ data ) ; }
Create list item

@param  array                     $data
@return \Tmdb\Model\AbstractModel
Create list item