2017 © Pedro Peláez
 

library prefix-registry

CakePHP PrefixRegistry

image

junkins/prefix-registry

CakePHP PrefixRegistry

  • Wednesday, December 28, 2016
  • by Junkins
  • Repository
  • 1 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

PrefixRegistry

Introduction

You can lay Components and Helpers hierarchically., (*1)

Setup

Components, (*2)

<?php
namespace App\Controller\Admin;

use Cake\Controller\Controller;
use PrefixRegistry\Controller\PrefixComponentRegistry;

class AppController extends Controller
{

    /**
     * initialize
     */
    public function initialize()
    {
        parent::initialize();
        // you can use Components definded on
        // '/src/Controller/Component/Admin/*' OR '/src/Controller/Component/*'.
        $this->_components = new PrefixComponentRegistry($this);
    }
}

Helpers, (*3)

<?php
namespace App\View\Admin;

use Cake\View\View;
use PrefixRegistry\View\PrefixHelperRegistry;

class AdminView extends View
{
     public function initialize()
     {
         parent::initialize();
         // you can use Helpers definded on
         // '/src/View/Helper/Admin/*' OR '/src/View/Helper/*'.
         $this->_helpers = new PrefixHelperRegistry($this);
     }
}

The Versions

28/12 2016

dev-master

9999999-dev

CakePHP PrefixRegistry

  Sources   Download