2017 © Pedro Peláez
 

library modular-presenter-mapping

Modularity for presenter mapping in Nette presenter factory.

image

zenify/modular-presenter-mapping

Modularity for presenter mapping in Nette presenter factory.

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 7 % Grown

The README.md

ModularPresenterMapping

Build Status Quality Score Code Coverage Downloads Latest stable, (*1)

Install

Via Composer, (*2)

$ composer require zenify/modular-presenter-mapping

Register the extension in config.neon:, (*3)

extensions:
    - Zenify\ModularPresenterMapping\DI\ModularPresenterMappingExtension

Usage

To add own presenter mapping, create class that will implement Zenify\ModularPresenterMapping\Contract\Application\PresenterMappingProviderInterface, (*4)

use Zenify\ModularPresenterMapping\Contract\Application\PresenterMappingProviderInterface;


final class MyExtensionPresenterMapping implements PresenterMappingProviderInterface
{

    /**
     * {@inheritdoc}
     */
    public function provide()
    {
        return [
            // module => it's namespace, "*" is for presenter name
            'PayPal' => 'My\Package\Presenter\*Presenter'   
        ];
    }

}

Then in redirect:, (*5)

$this->redirect('PayPal:Payment');

or template:, (*6)

<a n:href="PayPal:Payment">Pay!</a>

would go to: My\Package\Presenter\PaymentPresenter., (*7)

Testing

$ phpunit

Contributing

Please see CONTRIBUTING for details., (*8)

The Versions

24/09 2015

dev-master

9999999-dev

Modularity for presenter mapping in Nette presenter factory.

  Sources   Download

MIT

The Requires

 

The Development Requires

23/09 2015

v0.1.0

0.1.0.0

Modularity for presenter mapping in Nette presenter factory.

  Sources   Download

MIT

The Requires

 

The Development Requires