Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- interface ClientResourceLocator
- {
- /*
- * Return the URL for accessing the given resource over the web
- *
- * @param string $package The full composer package name
- * @param string $filename The name of the resource within that package
- * @return string A URL. If the URL is on the same domain as the site, it may be a root-relative URL. Otherwise it will be a protocol-agnostic URL.
- * @throws ResourceNotAvailableException If the resource does not exist or is not accessible via the client
- */
- public function getResourceURL($package, $filename);
- /*
- * Returns true if the given resource is available to the client
- *
- * @param string $package The full composer package name
- * @param string $filename The name of the resource within that package
- * @return boolean
- */
- public function hasClientResource($package, $filename);
- }
- interface ServerResourceLocator
- {
- /*
- * Return the URL for accessing the given resource over the web
- *
- * @param string $package The full composer package name
- * @param string $filename The name of the resource within that package
- * @return string The absolute pathname of the files
- * @throws ResourceNotAvailableException If the resource does not exist or is private to the module
- */
- public function getResourceFilename($package, $filename);
- /*
- * Returns true if the given resource is available to the server
- *
- * @param string $package The full composer package name
- * @param string $filename The name of the resource within that package
- * @return boolean
- */
- public function hasResource($package, $filename);
- }
- class ResourceNotAvailableException extends LogicException
- {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement