https://github.com/thecodingmachine/utils.common.url-interface
This package contains an interface used by many objects to say they represent a URL. The concept is very simple, the object implements a getUrl method, and that's it!
https://github.com/thecodingmachine/utils.common.url-interface
Last synced: 3 months ago
JSON representation
This package contains an interface used by many objects to say they represent a URL. The concept is very simple, the object implements a getUrl method, and that's it!
- Host: GitHub
- URL: https://github.com/thecodingmachine/utils.common.url-interface
- Owner: thecodingmachine
- License: mit
- Created: 2013-05-22T11:34:55.000Z (about 13 years ago)
- Default Branch: 1.0
- Last Pushed: 2014-06-04T16:19:46.000Z (about 12 years ago)
- Last Synced: 2025-02-16T12:30:30.742Z (over 1 year ago)
- Language: PHP
- Size: 141 KB
- Stars: 0
- Watchers: 12
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
What is this package
====================
This package contains an interface used by many objects to declare they represent a single URL.
If your objects represent an URL (for instance your object is a link, they should implement *UrlInterface*.
An object implementing this interface will return a single URL, as a string when the "getUrl()" method is called.
This is a very simple and useful system for classes representing links, pages, etc...
```php
namespace Mouf\Utils;
interface UrlInterface {
/**
* Returns the URL represented by this object, as a string.
*
* @return string
*/
public function getUrl();
}
```
This package comes with a simple **Url** class that implements this interface.
Mouf package
------------
This package is part of Mouf (http://mouf-php.com), an effort to ensure good developing practices by providing a graphical dependency injection framework.