Moinax\TvDb\Client::getActors PHP Method

getActors() public method

Find all actors related to a serie
public getActors ( integer $serieId ) : array
$serieId integer
return array
    public function getActors($serieId)
    {
        $data = $this->fetchXml('series/' . $serieId . '/actors.xml');
        $actors = array();
        foreach ($data->Actor as $actor) {
            $actors[] = new Actor($actor);
        }
        return $actors;
    }

Usage Example

 public function getShowActors($showId)
 {
     $actors = $this->tvDb->getActors($showId);
     return JsonResponse::create($actors);
 }