PHP Classes

File: Config/bootstrap.php

Recommend this page to a friend!
  Classes of Nerijus   CakePHP 2.x Container   Config/bootstrap.php   Download  
File: Config/bootstrap.php
Role: Configuration script
Content type: text/plain
Description: Configuration script
Class: CakePHP 2.x Container
Interoperable container integration with CakePHP
Author: By
Last change: added CakePHP Coding Standards check and fixed current issues
Date: 7 years ago
Size: 447 bytes
 

Contents

Class file image Download
<?php
/**
 * CakePHP Container Interop Plugin initialization.
 *
 * Handles registering initialized container in ClassRegistry\
 */

use Interop\Container\ContainerInterface;

App::uses('ClassRegistry', 'Utility');

$containerFile = Configure::read(ContainerInterface::CLASS) ?: APP . 'Config/container.php';

ClassRegistry::addObject(ContainerInterface::CLASS, require $containerFile);
ClassRegistry::map('container', ContainerInterface::CLASS);