zenify/modular-presenter-mapping 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

zenify/modular-presenter-mapping

最新稳定版本:v0.1.0

Composer 安装命令:

composer require zenify/modular-presenter-mapping

包简介

Modularity for presenter mapping in Nette presenter factory.

README 文档

README

Build Status Quality Score Code Coverage Downloads Latest stable

Install

Via Composer

$ composer require zenify/modular-presenter-mapping

Register the extension in config.neon:

extensions:
	- Zenify\ModularPresenterMapping\DI\ModularPresenterMappingExtension

Usage

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

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:

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

or template:

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

would go to: My\Package\Presenter\PaymentPresenter.

Testing

$ phpunit

Contributing

Please see CONTRIBUTING for details.

统计信息

  • 总下载量: 13.26k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-09-23