private function findAttrParams(Sco $sco, \DOMNode $item, \DOMNodeList $resources)
    {
        $identifier = $item->attributes->getNamedItem('identifier');
        $isVisible = $item->attributes->getNamedItem('isvisible');
        $identifierRef = $item->attributes->getNamedItem('identifierref');
        $parameters = $item->attributes->getNamedItem('parameters');

        // throws an Exception if identifier is undefined
        if (is_null($identifier)) {
            throw new InvalidScormArchiveException('sco_with_no_identifier_message');
        }
        $sco->setIdentifier($identifier->nodeValue);

        // visible is true by default
        if (!is_null($isVisible) && 'false' === $isVisible) {
            $sco->setVisible(false);
        } else {
            $sco->setVisible(true);
        }

        // set parameters for SCO entry resource
        if (!is_null($parameters)) {
            $sco->setParameters($parameters->nodeValue);
        }

        // check if item is a block or a SCO. A block doesn't define identifierref
        if (is_null($identifierRef)) {
            $sco->setBlock(true);
        } else {
            $sco->setBlock(false);
            // retrieve entry URL
            $sco->setEntryUrl($this->findEntryUrl($identifierRef->nodeValue, $resources));
        }
    }
private function findAttrParams(Sco $sco, \DOMNode $item, \DOMNodeList $resources)
    {
        $identifier = $item->attributes->getNamedItem('identifier');
        $isVisible = $item->attributes->getNamedItem('isvisible');
        $identifierRef = $item->attributes->getNamedItem('identifierref');
        $parameters = $item->attributes->getNamedItem('parameters');

        // throws an Exception if identifier is undefined
        if (is_null($identifier)) {
            throw new InvalidScormArchiveException('sco_with_no_identifier_message');
        }
        $sco->setIdentifier($identifier->nodeValue);

        // visible is true by default
        if (!is_null($isVisible) && 'false' === $isVisible) {
            $sco->setVisible(false);
        } else {
            $sco->setVisible(true);
        }

        // set parameters for SCO entry resource
        if (!is_null($parameters)) {
            $sco->setParameters($parameters->nodeValue);
        }

        // check if item is a block or a SCO. A block doesn't define identifierref
        if (is_null($identifierRef)) {
            $sco->setBlock(true);
        } else {
            $sco->setBlock(false);
            // retrieve entry URL
            $sco->setEntryUrl($this->findEntryUrl($identifierRef->nodeValue, $resources));
        }
    }
private function findAttrParams ( Sco $ sco , \ DOMNode $ item , \ DOMNodeList $ resources ) { $ identifier = $ item -> attributes -> getNamedItem ( 'identifier' ) ; $ isVisible = $ item -> attributes -> getNamedItem ( 'isvisible' ) ; $ identifierRef = $ item -> attributes -> getNamedItem ( 'identifierref' ) ; $ parameters = $ item -> attributes -> getNamedItem ( 'parameters' ) ; // throws an Exception if identifier is undefined if ( is_null ( $ identifier ) ) { throw new InvalidScormArchiveException ( 'sco_with_no_identifier_message' ) ; } $ sco -> setIdentifier ( $ identifier -> nodeValue ) ; // visible is true by default if ( ! is_null ( $ isVisible ) && 'false' === $ isVisible ) { $ sco -> setVisible ( false ) ; } else { $ sco -> setVisible ( true ) ; } // set parameters for SCO entry resource if ( ! is_null ( $ parameters ) ) { $ sco -> setParameters ( $ parameters -> nodeValue ) ; } // check if item is a block or a SCO. A block doesn't define identifierref if ( is_null ( $ identifierRef ) ) { $ sco -> setBlock ( true ) ; } else { $ sco -> setBlock ( false ) ; // retrieve entry URL $ sco -> setEntryUrl ( $ this -> findEntryUrl ( $ identifierRef -> nodeValue , $ resources ) ) ; } }
Initializes parameters of the SCO defined in attributes of the node.
It also look for the associated resource if it is a SCO and not a block.

@param Sco          $sco
@param \DOMNode     $item
@param \DOMNodeList $resources

@throws InvalidScormArchiveException
Initializes parameters of the SCO defined in attributes of the node . It also look for the associated resource if it is a SCO and not a block .