src/Element/Collection.php
public function setAcceptedTypes(array $types)
    {
        /** @var \DOMNodeList $nodes */
        // No REQUIRED — no exception.
        $nodes = $this->query('app:accept');
        foreach ($nodes as $node) {
            $this->getDomElement()->removeChild($node);
        }
        foreach ($types as $type) {
            $element = $this->getDomElement()->ownerDocument
                ->createElementNS($this->ns(), 'accept', $type);
            $this->getDomElement()->appendChild($element);
        }
        $this->setCachedProperty('accept', $types);
    }
public function setAcceptedTypes(array $types)
    {
        /** @var \DOMNodeList $nodes */
        // No REQUIRED — no exception.
        $nodes = $this->query('app:accept');
        foreach ($nodes as $node) {
            $this->getDomElement()->removeChild($node);
        }
        foreach ($types as $type) {
            $element = $this->getDomElement()->ownerDocument
                ->createElementNS($this->ns(), 'accept', $type);
            $this->getDomElement()->appendChild($element);
        }
        $this->setCachedProperty('accept', $types);
    }
public function setAcceptedTypes ( array $ types ) { /** @var \DOMNodeList $nodes */ // No REQUIRED — no exception. $ nodes = $ this -> query ( 'app:accept' ) ; foreach ( $ nodes as $ node ) { $ this -> getDomElement ( ) -> removeChild ( $ node ) ; } foreach ( $ types as $ type ) { $ element = $ this -> getDomElement ( ) -> ownerDocument -> createElementNS ( $ this -> ns ( ) , 'accept' , $ type ) ; $ this -> getDomElement ( ) -> appendChild ( $ element ) ; } $ this -> setCachedProperty ( 'accept' , $ types ) ; }
Set types of representations accepted by the Collection.

@param string[] $types

@since 1.0
Set types of representations accepted by the Collection .