lib/Adrenth/Tvrage/Response/Traits/DenormalizesDetailedShow.php
final protected function denormalizeDetailedShow(array $data)
    {
        $detailedShow = new DetailedShow();

        $referenceMap = [
            'showid' => 'setShowId',
            'name' => 'setName',
            'showname' => 'setName',
            'link' => 'setLink',
            'image' => 'setImage',
            'showlink' => 'setLink',
            'ended' => 'setEnded',
            'country' => 'setCountry',
            'origin_country' => 'setOriginCountry',
            'seasons' => 'setSeasonCount',
            'totalseasons' => 'setSeasonCount',
            'status' => 'setStatus',
            'runtime' => 'setRuntime',
            'classification' => 'setClassification',
            'airtime' => 'setAirtime',
            'airday' => 'setAirday',
            'timezone' => 'setTimeZone'
        ];

        $complexMap = [
            'akas' => 'handleAkas',
            'genres' => 'handleGenres',
            'network' => 'handleNetwork',
            'Episodelist' => 'handleEpisodeList',
        ];

        $ignore = [
            'startdate' => null,
            'started' => null,
        ];

        foreach ($data as $attribute => $value) {
            if (array_key_exists($attribute, $referenceMap)) {
                $detailedShow->$referenceMap[$attribute]($value);
            } elseif (array_key_exists($attribute, $complexMap)) {
                $this->$complexMap[$attribute]($detailedShow, $value);
            } elseif (!array_key_exists($attribute, $ignore)) {
                throw new UnimplementedAttributeException(sprintf(
                    'Attribute %s is not implemented',
                    $attribute
                ));
            }
        }

        return $detailedShow;
    }
final protected function denormalizeDetailedShow(array $data)
    {
        $detailedShow = new DetailedShow();

        $referenceMap = [
            'showid' => 'setShowId',
            'name' => 'setName',
            'showname' => 'setName',
            'link' => 'setLink',
            'image' => 'setImage',
            'showlink' => 'setLink',
            'ended' => 'setEnded',
            'country' => 'setCountry',
            'origin_country' => 'setOriginCountry',
            'seasons' => 'setSeasonCount',
            'totalseasons' => 'setSeasonCount',
            'status' => 'setStatus',
            'runtime' => 'setRuntime',
            'classification' => 'setClassification',
            'airtime' => 'setAirtime',
            'airday' => 'setAirday',
            'timezone' => 'setTimeZone'
        ];

        $complexMap = [
            'akas' => 'handleAkas',
            'genres' => 'handleGenres',
            'network' => 'handleNetwork',
            'Episodelist' => 'handleEpisodeList',
        ];

        $ignore = [
            'startdate' => null,
            'started' => null,
        ];

        foreach ($data as $attribute => $value) {
            if (array_key_exists($attribute, $referenceMap)) {
                $detailedShow->$referenceMap[$attribute]($value);
            } elseif (array_key_exists($attribute, $complexMap)) {
                $this->$complexMap[$attribute]($detailedShow, $value);
            } elseif (!array_key_exists($attribute, $ignore)) {
                throw new UnimplementedAttributeException(sprintf(
                    'Attribute %s is not implemented',
                    $attribute
                ));
            }
        }

        return $detailedShow;
    }
final protected function denormalizeDetailedShow ( array $ data ) { $ detailedShow = new DetailedShow ( ) ; $ referenceMap = [ 'showid' => 'setShowId' , 'name' => 'setName' , 'showname' => 'setName' , 'link' => 'setLink' , 'image' => 'setImage' , 'showlink' => 'setLink' , 'ended' => 'setEnded' , 'country' => 'setCountry' , 'origin_country' => 'setOriginCountry' , 'seasons' => 'setSeasonCount' , 'totalseasons' => 'setSeasonCount' , 'status' => 'setStatus' , 'runtime' => 'setRuntime' , 'classification' => 'setClassification' , 'airtime' => 'setAirtime' , 'airday' => 'setAirday' , 'timezone' => 'setTimeZone' ] ; $ complexMap = [ 'akas' => 'handleAkas' , 'genres' => 'handleGenres' , 'network' => 'handleNetwork' , 'Episodelist' => 'handleEpisodeList' , ] ; $ ignore = [ 'startdate' => null , 'started' => null , ] ; foreach ( $ data as $ attribute => $ value ) { if ( array_key_exists ( $ attribute , $ referenceMap ) ) { $ detailedShow -> $ referenceMap [ $ attribute ] ( $ value ) ; } elseif ( array_key_exists ( $ attribute , $ complexMap ) ) { $ this -> $ complexMap [ $ attribute ] ( $ detailedShow , $ value ) ; } elseif ( ! array_key_exists ( $ attribute , $ ignore ) ) { throw new UnimplementedAttributeException ( sprintf ( 'Attribute %s is not implemented' , $ attribute ) ) ; } } return $ detailedShow ; }
Denormalize Detailed Show

@param array $data
@return DetailedShow
@throws UnimplementedAttributeException
Denormalize Detailed Show