Doctrine


Doctrine\Doctrine_Locator_Injectable
/Doctrine/Locator/Injectable.php at line 36

Class Doctrine_Locator_Injectable

Doctrine_Locator_Injectable

public class Doctrine_Locator_Injectable

Doctrine_Locator_Injectable

Package:
Doctrine
Subpackage:
Doctrine_Locator
Category:
Locator
License:
http://www.gnu.org/licenses/lgpl.txt LGPL
See Also:
http://www.doctrine-project.org
Author:
Janne Vanhala
Konsta Vesterinen
Eevert Saukkokoski
Version:
$Revision$
Since:
1.0

Field Summary
protected Doctrine_Locator the locator object

$_locator

.

protected static Doctrine_Null $null Doctrine_Null object, used for extremely fast null value checking

$_null

.

protected array an array of bound resources

$_resources

.

Method Summary
Doctrine_Locator

bind(string name, mixed resource, mixed value)

bind binds a resource to a name.

Doctrine_Locator

getLocator()

getLocator returns the locator associated with this object.

static Doctrine_Null

getNullObject()

getNullObject returns the null object associated with this object.

static void

initNullObject(Doctrine_Null null)

initNullObject initializes the null object.

mixed

locate(string name)

locate locates a resource by given name and returns it.

Doctrine_Locator_Injectable

setLocator(mixed locator, Doctrine_Locator the)

setLocator this method can be used for setting the locator object locally.

Field Detail

/Doctrine/Locator/Injectable.php at line 41

_locator

protected Doctrine_Locator the locator object $_locator


/Doctrine/Locator/Injectable.php at line 51

_null

protected static Doctrine_Null $null Doctrine_Null object, used for extremely fast null value checking $_null


/Doctrine/Locator/Injectable.php at line 46

_resources

protected array an array of bound resources $_resources = array()


Method Detail

/Doctrine/Locator/Injectable.php at line 120

bind

public Doctrine_Locator bind(string name, mixed resource, mixed value)

bind binds a resource to a name

Parameters:
name - the name of the resource to bind
value - the value of the resource
Returns:
this object

/Doctrine/Locator/Injectable.php at line 75

getLocator

public Doctrine_Locator getLocator()

getLocator returns the locator associated with this object

if there are no locator locally associated then this method tries to fetch the current global locator


/Doctrine/Locator/Injectable.php at line 145

getNullObject

public static Doctrine_Null getNullObject()

getNullObject returns the null object associated with this object


/Doctrine/Locator/Injectable.php at line 134

initNullObject

public static void initNullObject(Doctrine_Null null)

initNullObject initializes the null object


/Doctrine/Locator/Injectable.php at line 96

locate

public mixed locate(string name)

locate locates a resource by given name and returns it

if the resource cannot be found locally this method tries to use the global locator for finding the resource

See Also:
Doctrine_Locator::locate()
Throws:
if the resource could not be found
Parameters:
name - the name of the resource
Returns:
the located resource

/Doctrine/Locator/Injectable.php at line 60

setLocator

public Doctrine_Locator_Injectable setLocator(mixed locator, Doctrine_Locator the)

setLocator this method can be used for setting the locator object locally

Parameters:
the - locator object
Returns:
this instance

Doctrine