New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

adeira/presenter-factory

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

adeira/presenter-factory

Source
Packagist
This package is abandoned and is no longer maintained.
The author recommends using librette/presenter-factory instead.
This version has been yanked by its maintainers and should not be used.
Version
v1.0.4
Version published
Total downloads
21K
Maintainers
1
Created
Source

Enhanced presenter factory for Nette Framework

This package is fork of librette/presenter-factory. Unfortunately author of this package is not taking care of this package anymore. But it's very useful. So that's why. And now what:

Build Status

Nette Framework does have very simple presenter factory which helps you to map namespaces of presenters to the presenter name and vice versa. Unfortunately it's not possible to map two namespaces under one module section:

application:
  mapping:
    Module: App\Presenters\*Presenter

But with this package it is possible:

application:
  mapping:
    Module:
      - App\Presenters\*Presenter
      - Bpp\Controllers\*Controller

In this case Nette is going to look for presenters in two namespaces. This is extremely useful if you have a lot of bundles separated by functionality. For example you have API module with this mapping:

['Api' => 'Ant\ApiModule\Presenters\*Presenter']

Then you have Assets bundle. In this bundle you can setup mapping for presenters under Assets package but related to the API like this:

['Api' => 'Ant\Assets\ApiModule\Presenters\*Presenter']

I found this very useful.

Keywords

application

FAQs

Package last updated on 14 Oct 2016

Related posts