Skip to content
This repository has been archived by the owner. It is now read-only.
[DEPRECATED] Nette Framework link factory indepedent of presenter
PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
tests
.gitignore init Aug 19, 2014
.travis.yml
LICENSE
README.md
composer.json

README.md

Nextras LinkFactory

====================

This repository is deprecated.
The same functionality is provided by Nette Framework itself.
Use LinkGenerator in nette/application.

====================

Build Status Downloads this Month Stable version HHVM Status

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');
	}
}
You can’t perform that action at this time.