nextras / link-factory
Simple link factory independent of presenter.
Installs: 20 262
Dependents: 0
Suggesters: 0
Security: 0
Stars: 22
Watchers: 7
Forks: 6
Open Issues: 0
Requires
- php: >=5.3
- nette/application: ~2.2
Requires (Dev)
- mockery/mockery: ~0.9
- nette/tester: ~1.3
README
====================
This repository is deprecated.
The same functionality is provided by Nette Framework itself.
Use LinkGenerator
in nette/application.
====================
Installation
Add to your composer.json:
"require": {
"nextras/link-factory": "~1.0"
}
Example
use Nextras\Application\LinkFactory; class Example { /** @var LinkFactory */ private $linkFactory; public function __construct(LinkFactory $linkFactory) { $this->linkFactory = $linkFactory; } public function doSomething() { // relative link with optional fragment (#comments) and parameters $link = $this->linkFactory->link('Products:view#comments', ['id' => 123]); // absolute link starts with '//' $link = $this->linkFactory->link('//Homepage:default'); } }