Lines Matching refs:extension
198 * @param string $extension - {@link Snippet::EXTENSION_CSS css} or {@link Snippet::EXTENSION_JS js}
201 public static function getOrCreateFromComponentId(string $componentId, string $extension): Snippet
204 $snippetPath = self::getInternalPathFromNameAndExtension($componentId, $extension);
390 $messageFormat = "The url has a file name ($libraryName) that does not have any extension. To create a snippet from a remote url, the url should have a path where the last is the name of the library file. ";
481 public static function getInternalPathFromNameAndExtension($name, $extension): WikiPath
484 switch ($extension) {
486 $extension = "css";
488 ->getComponentStylePathByName(strtolower($name) . ".$extension");
490 $extension = "js";
494 ->resolve(strtolower($name) . ".$extension");
496 $message = "Unknown snippet type ($extension)";
528 // no path extension
935 $extension = $this->getExtension();
936 switch ($extension) {
947 LogUtility::internalError("The extension ($extension) is unknown", self::CANONICAL);
991 $extension = $this->getExtension();
992 switch ($extension) {
1082 throw new ExceptionBadState("The extension ($extension) is unknown", self::CANONICAL);