lib/Adrenth/Tvrage/Response/Traits/DenormalizesDetailedShow.php
protected function handleAkas(DetailedShow $show, array $akas)
    {
        if (!array_key_exists('aka', $akas)) {
            return;
        }

        if (is_string($akas['aka'])) {
            $akas['aka'] = [['#' => $akas['aka']]];
        }

        foreach ($akas['aka'] as $attributes) {
            $aka = new Aka();

            if (is_string($attributes)) {
                $aka->setTitle($attributes);
                $show->addAka($aka);
                continue;
            }

            if (array_key_exists('@attr', $attributes)) {
                $aka->setAttr($attributes['@attr']);
            }
            if (array_key_exists('@country', $attributes)) {
                $aka->setCountry($attributes['@country']);
            }
            if (array_key_exists('#', $attributes)) {
                $aka->setTitle($attributes['#']);
            }

            $show->addAka($aka);
        }
    }
protected function handleAkas(DetailedShow $show, array $akas)
    {
        if (!array_key_exists('aka', $akas)) {
            return;
        }

        if (is_string($akas['aka'])) {
            $akas['aka'] = [['#' => $akas['aka']]];
        }

        foreach ($akas['aka'] as $attributes) {
            $aka = new Aka();

            if (is_string($attributes)) {
                $aka->setTitle($attributes);
                $show->addAka($aka);
                continue;
            }

            if (array_key_exists('@attr', $attributes)) {
                $aka->setAttr($attributes['@attr']);
            }
            if (array_key_exists('@country', $attributes)) {
                $aka->setCountry($attributes['@country']);
            }
            if (array_key_exists('#', $attributes)) {
                $aka->setTitle($attributes['#']);
            }

            $show->addAka($aka);
        }
    }
protected function handleAkas ( DetailedShow $ show , array $ akas ) { if ( ! array_key_exists ( 'aka' , $ akas ) ) { return ; } if ( is_string ( $ akas [ 'aka' ] ) ) { $ akas [ 'aka' ] = [ [ '#' => $ akas [ 'aka' ] ] ] ; } foreach ( $ akas [ 'aka' ] as $ attributes ) { $ aka = new Aka ( ) ; if ( is_string ( $ attributes ) ) { $ aka -> setTitle ( $ attributes ) ; $ show -> addAka ( $ aka ) ; continue ; } if ( array_key_exists ( '@attr' , $ attributes ) ) { $ aka -> setAttr ( $ attributes [ '@attr' ] ) ; } if ( array_key_exists ( '@country' , $ attributes ) ) { $ aka -> setCountry ( $ attributes [ '@country' ] ) ; } if ( array_key_exists ( '#' , $ attributes ) ) { $ aka -> setTitle ( $ attributes [ '#' ] ) ; } $ show -> addAka ( $ aka ) ; } }
Handle A.K.A's

@param DetailedShow $show
@param array        $akas
@return void
Handle A . K . A s