jClasses

This object is responsible to include and instancy some classes stored in the classes directory of modules.

package

jelix

subpackage

utils

static

Methods

__construct

__construct() 

Get the binding corresponding to the specified selector.

bind(string $selector) : \jClassBinding
static

Better for use like this : jClasses::bind($selector)->getClassName()

see \jClasses::bind
since 1.1
experimental

This method is EXPERIMENTAL. It could be changed in future version

Arguments

$selector

string

Response

\jClassBinding

include the given class and return an instance

create(string $selector) : object
static

Arguments

$selector

string

the jelix selector correponding to the class

Response

object

an instance of the classe

Shortcut to corresponding jClassBinding::getInstance() but without singleton The binding is recreated each time (be careful about performance)

createBinded(string $selector) : object
static
since 1.1
experimental

This method is EXPERIMENTAL. It could be changed in future version

Arguments

$selector

string

Selector to a bindable class|interface

Response

object

Corresponding instance

alias of create method

createInstance( $selector) 
static
see \jClasses::create()

Arguments

$selector

Shortcut to corresponding jClassBinding::getInstance()

getBindedService(string $selector) : object
static
since 1.1
experimental

This method is EXPERIMENTAL. It could be changed in future version

Arguments

$selector

string

Selector to a bindable class|interface

Response

object

Corresponding instance

include the given class and return always the same instance

getService(string $selector) : object
static

Arguments

$selector

string

the jelix selector correponding to the class

Response

object

an instance of the classe

only include a class

inc(string $selector) 
static

Arguments

$selector

string

the jelix selector correponding to the class

include an interface

incIface(string $selector) 
static
since 1.0b2

Arguments

$selector

string

the jelix selector correponding to the interface

Reset the defined bindings (should only use it for unit tests)

resetBindings() : void
static
since 1.1
experimental

This method is EXPERIMENTAL. It could be changed in future version

Properties

_instances

_instances : 
static

Type(s)

_bindings

_bindings : 
static

Type(s)