parse($matches[2], $attributes); } } else { $url = ResourceTranslator::toUrl($url); } } } return $url; } public static function getParser($className) { if (!isset(self::$parsers[$className])) { foreach (self::$registeredNamespaces as $namespace) { $class = $namespace . $className; if (class_exists($class)) { self::$parsers[$className] = new $class(); break; } } if (!isset(self::$parsers[$className])) { self::$parsers[$className] = false; } } return self::$parsers[$className]; } }