Prado\Data\SqlMap\Configuration\TSqlMapXmlConfigBuilder::getElementByIdValue PHP 메소드

getElementByIdValue() 보호된 메소드

Get element node by ID value (try for attribute name ID as case insensitive).
protected getElementByIdValue ( SimpleXmlDocument $document, $tag, $value ) : SimpleXmlElement
$document SimpleXmlDocument
리턴 SimpleXmlElement node if found, null otherwise.
    protected function getElementByIdValue($document, $tag, $value)
    {
        //hack to allow upper case and lower case attribute names.
        foreach (array('id', 'ID', 'Id', 'iD') as $id) {
            $xpath = "//{$tag}[@{$id}='{$value}']";
            foreach ($document->xpath($xpath) as $node) {
                return $node;
            }
        }
    }