public function setAttribute($attribute = '')
    {
        if ('' === $this->defaultOptions['mediaType']) {
            throw new \InvalidArgumentException('Attribute relates to media type but no media type is set.');
        }

        // check if the attribute is in the set of attributes for media type
        if (in_array($attribute, $this->attributesTypes[$this->defaultOptions['mediaType']])) {
            $this->defaultOptions['attribute'] = $attribute;
        } else {
            throw new \InvalidArgumentException('Attribute is not in the set of attributes for this media type.');
        }
    }
public function setAttribute($attribute = '')
    {
        if ('' === $this->defaultOptions['mediaType']) {
            throw new \InvalidArgumentException('Attribute relates to media type but no media type is set.');
        }

        // check if the attribute is in the set of attributes for media type
        if (in_array($attribute, $this->attributesTypes[$this->defaultOptions['mediaType']])) {
            $this->defaultOptions['attribute'] = $attribute;
        } else {
            throw new \InvalidArgumentException('Attribute is not in the set of attributes for this media type.');
        }
    }
public function setAttribute ( $ attribute = '' ) { if ( '' === $ this -> defaultOptions [ 'mediaType' ] ) { throw new \ InvalidArgumentException ( 'Attribute relates to media type but no media type is set.' ) ; } // check if the attribute is in the set of attributes for media type if ( in_array ( $ attribute , $ this -> attributesTypes [ $ this -> defaultOptions [ 'mediaType' ] ] ) ) { $ this -> defaultOptions [ 'attribute' ] = $ attribute ; } else { throw new \ InvalidArgumentException ( 'Attribute is not in the set of attributes for this media type.' ) ; } }
Set the attribute you want to search in the iTunes
store.
This is relative to the set media type.

@param string $attribute

@throws \InvalidArgumentException
Set the attribute you want to search in the iTunes store . This is relative to the set media type .