public function findEntryUrl($identifierref, \DOMNodeList $resources)
    {
        foreach ($resources as $resource) {
            $identifier = $resource->attributes->getNamedItem('identifier');

            if (!is_null($identifier)) {
                $identifierValue = $identifier->nodeValue;

                if ($identifierValue === $identifierref) {
                    $href = $resource->attributes->getNamedItem('href');

                    if (is_null($href)) {
                        throw new InvalidScormArchiveException('sco_resource_without_href_message');
                    }

                    return $href->nodeValue;
                }
            }
        }
        throw new InvalidScormArchiveException('sco_without_resource_message');
    }
public function findEntryUrl($identifierref, \DOMNodeList $resources)
    {
        foreach ($resources as $resource) {
            $identifier = $resource->attributes->getNamedItem('identifier');

            if (!is_null($identifier)) {
                $identifierValue = $identifier->nodeValue;

                if ($identifierValue === $identifierref) {
                    $href = $resource->attributes->getNamedItem('href');

                    if (is_null($href)) {
                        throw new InvalidScormArchiveException('sco_resource_without_href_message');
                    }

                    return $href->nodeValue;
                }
            }
        }
        throw new InvalidScormArchiveException('sco_without_resource_message');
    }
public function findEntryUrl ( $ identifierref , \ DOMNodeList $ resources ) { foreach ( $ resources as $ resource ) { $ identifier = $ resource -> attributes -> getNamedItem ( 'identifier' ) ; if ( ! is_null ( $ identifier ) ) { $ identifierValue = $ identifier -> nodeValue ; if ( $ identifierValue === $ identifierref ) { $ href = $ resource -> attributes -> getNamedItem ( 'href' ) ; if ( is_null ( $ href ) ) { throw new InvalidScormArchiveException ( 'sco_resource_without_href_message' ) ; } return $ href -> nodeValue ; } } } throw new InvalidScormArchiveException ( 'sco_without_resource_message' ) ; }
Searches for the resource with the given id and retrieve URL to its content.

@param string       $identifierref id of the resource associated to the SCO
@param \DOMNodeList $resources

@return string URL to the resource associated to the SCO

@throws InvalidScormArchiveException
Searches for the resource with the given id and retrieve URL to its content .