mouf / 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!
Installs: 351 720
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 12
Forks: 0
Open Issues: 0
Requires
- php: >=5.3.0
README
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...
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.