Lines Matching defs:url

35  *   * if not found or if the usage of the cdn is required, the {@link Snippet::getRemoteUrl() url} is used
56 const JSON_URL_PROPERTY = "url"; // external url
195 * The snippet id is the url for external resources (ie external javascript / stylesheet)
234 * @param WikiPath $path - a local path of the snippet (if the path does not exist, a remote url should be given)
366 * An utility class to create a snippet from a remote url
370 * and set {@link Snippet::setRemoteUrl() remote url}
372 * @throws ExceptionBadArgument - if the url does not have a file name
374 public static function getOrCreateFromRemoteUrl(Url $url): Snippet
378 $libraryName = $url->getLastName();
380 $messageFormat = "The following url ($url) does not have a file name. To create a snippet from a remote url, the url should have a path where the last is the name of the library file.";
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. ";
394 ->setRemoteUrl($url);
666 * use cdn is on and there is a remote url
682 * Use cdn is off and there is a remote url
692 * We default to the local url that will return an error
696 LogUtility::internalError("The snippet ($this) is not a inline script, it has a path ($this->path) that does not exists and does not have any external url.");
711 throw new ExceptionRuntimeInternal("The local url should ne asked. use (hasLocalUrl) before calling this function", self::CANONICAL, $e);
723 throw new ExceptionNotFound("No remote url found");
843 * and that there is a remote url
851 // no remote url, no file, no inline: error
852 LogUtility::internalError("The snippet ($this) does not have content defined (the path does not exist, no inline content and no remote url)", self::CANONICAL);
958 public function setRemoteUrl(Url $url): Snippet
960 $this->remoteUrl = $url;