コード例 #1
0
ファイル: Map.php プロジェクト: fwk/xml
 /**
  * Returns Path attributes list
  *
  * @param Path             $path Current Path
  * @param SimpleXMLElement $node Current SimpleXML node
  *
  * @return array
  */
 protected function getAttributesArray(Path $path, SimpleXMLElement $node)
 {
     $current = array();
     foreach ($path->getAttributes() as $keyName => $attr) {
         $val = isset($node[$attr]) ? trim((string) $node[$attr]) : null;
         $current[$keyName] = self::getFilteredValue($path, $val);
     }
     return $current;
 }