Documentation

Env
in package

A global environment repository.

In old code, use this instead of global variables - allows central tracking of dependencies. Do NOT use this in new code, inject dependencies instead. Example: WRONG: public function __construct() { $this->entityManager = Env::get('em'); } RIGHT: public function __construct($em) { $this->entityManager = $em; } Reason: Global state is untestable and leads to inflexible code.

Tags
copyright

CLOUDREXX CMS - CLOUDREXX AG

author

CLOUDREXX Development Team info@cloudrexx.com

subpackage

core

Table of Contents

Properties

$em  : mixed
$props  : mixed

Methods

clear()  : void
Clear the value of a prop
get()  : mixed
set()  : mixed

Properties

$props

protected static mixed $props = array()

Methods

clear()

Clear the value of a prop

public static clear(mixed $prop) : void
Parameters
$prop : mixed

indexname we want to unset

Tags
access

public

get()

public static get(mixed $prop) : mixed
Parameters
$prop : mixed

set()

public static set(mixed $prop, mixed &$val) : mixed
Parameters
$prop : mixed
$val : mixed

        
On this page

Search results