Class jClasses

Description

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

Located in /utils/jClasses.class.php (line 20)


	
			
Variable Summary
static mixed $_bindings
static mixed $_instances
Method Summary
static jClassBinding bind (string $selector, bool $singleton)
static object an create (string $selector)
static object Corresponding createBinded (string $selector)
static void createInstance ( $selector)
static object Corresponding getBindedService (string $selector)
static object an getService (string $selector)
static void inc (string $selector)
static void incIface (string $selector)
static void resetBindings ()
Variables
static mixed $_bindings = array() (line 24)
  • access: protected
static mixed $_instances = array() (line 22)
  • access: protected
Methods
static bind (line 102)

Get the binding corresponding to the specified selector.

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

  • see: jClasses::bind
  • since: 1.1
  • access: public
static jClassBinding bind (string $selector, bool $singleton)
  • string $selector
  • bool $singleton: if this binding should be a singleton or not
static create (line 33)

include the given class and return an instance

  • return: instance of the classe
  • access: public
static object an create (string $selector)
  • string $selector: the jelix selector correponding to the class
static createBinded (line 49)

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

  • return: instance
  • since: 1.1
  • access: public
static object Corresponding createBinded (string $selector)
  • string $selector: Selector to a bindable class|interface
static createInstance (line 57)

alias of create method

static void createInstance ( $selector)
  • $selector
static getBindedService (line 87)

Shortcut to corresponding jClassBinding::getInstance()

  • return: instance
  • since: 1.1
  • access: public
static object Corresponding getBindedService (string $selector)
  • string $selector: Selector to a bindable class|interface
static getService (line 67)

include the given class and return always the same instance

  • return: instance of the classe
  • access: public
static object an getService (string $selector)
  • string $selector: the jelix selector correponding to the class
static inc (line 128)

only include a class

  • access: public
static void inc (string $selector)
  • string $selector: the jelix selector correponding to the class
static incIface (line 138)

include an interface

  • since: 1.0b2
  • access: public
static void incIface (string $selector)
  • string $selector: the jelix selector correponding to the interface
static resetBindings (line 120)

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

  • since: 1.1
  • access: public
static void resetBindings ()

Documentation generated on Wed, 04 Jan 2017 22:52:27 +0100 by phpDocumentor 1.4.3