abstract class Doctrine_Configurable extends Doctrine_Locator_Injectable (View source)

Doctrine_Configurable the base for Doctrine_Table, Doctrine_Manager and Doctrine_Connection

Properties

protected Doctrine_Locator $_locator from Doctrine_Locator_Injectable
protected array $_resources from Doctrine_Locator_Injectable
static protected Doctrine_Null $_null from Doctrine_Locator_Injectable
protected array $attributes
protected Doctrine_Configurable $parent
protected array $_impl
protected array $_params

Methods

setLocator(Doctrine_Locator $locator)

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

getLocator()

getLocator returns the locator associated with this object

mixed
locate(string $name)

locate locates a resource by given name and returns it

bind($name, $resource)

bind binds a resource to a name

static void
initNullObject(Doctrine_Null $null)

initNullObject initializes the null object

static Doctrine_Null
getNullObject()

getNullObject returns the null object associated with this object

void
setAttribute(mixed $attribute, mixed $value)

setAttribute sets a given attribute

getParams($namespace = null)

No description

getParamNamespaces()

No description

setParam($name, $value, $namespace = null)

No description

getParam($name, $namespace = null)

No description

setImpl(string $template, string $class)

setImpl binds given class to given template name

string
getImpl($template)

getImpl returns the implementation for given class

hasImpl($template)

No description

void
setEventListener(Doctrine_EventListener $listener)

No description

addRecordListener($listener, $name = null)

addRecordListener

addListener($listener, $name = null)

addListener

mixed
getAttribute(integer $attribute)

returns the value of an attribute

void
unsetAttribute(integer $attribute)

Unset an attribute from this levels attributes

array
getAttributes()

getAttributes returns all attributes as an array

setCharset(string $charset)

Set the charset

mixed
getCharset()

Get the charset

setCollate(string $collate)

Set the collate

mixed
getCollate()

Get the collate

void
setParent(Doctrine_Configurable $component)

sets a parent for this configurable component the parent must be configurable component itself

getParent()

getParent returns the parent of this component

Details

Doctrine_Locator_Injectable setLocator(Doctrine_Locator $locator)

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

Parameters

Doctrine_Locator $locator the locator object

Return Value

Doctrine_Locator_Injectable this instance

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

Return Value

Doctrine_Locator

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

Parameters

string $name the name of the resource

Return Value

mixed the located resource

Exceptions

Doctrine_Locator_Exception if the resource could not be found

See also

Doctrine_Locator::locate

Doctrine_Locator bind($name, $resource)

bind binds a resource to a name

Parameters

$name
$resource

Return Value

Doctrine_Locator this object

static void initNullObject(Doctrine_Null $null)

initNullObject initializes the null object

Parameters

Doctrine_Null $null

Return Value

void

static Doctrine_Null getNullObject()

getNullObject returns the null object associated with this object

Return Value

Doctrine_Null

void setAttribute(mixed $attribute, mixed $value)

setAttribute sets a given attribute

$manager->setAttribute(Doctrine_Core::ATTR_PORTABILITY, Doctrine_Core::PORTABILITY_ALL);

Parameters

mixed $attribute either a Doctrine_Core::ATTR_* integer constant or a string corresponding to a constant
mixed $value the value of the attribute

Return Value

void

Exceptions

Doctrine_Exception if the value is invalid

See also

Doctrine_Core::ATTR_* constants

getParams($namespace = null)

Parameters

$namespace

getParamNamespaces()

setParam($name, $value, $namespace = null)

Parameters

$name
$value
$namespace

getParam($name, $namespace = null)

Parameters

$name
$namespace

Doctrine_Configurable setImpl(string $template, string $class)

setImpl binds given class to given template name

this method is the base of Doctrine dependency injection

Parameters

string $template name of the class template
string $class name of the class to be bound

Return Value

Doctrine_Configurable this object

string getImpl($template)

getImpl returns the implementation for given class

Parameters

$template

Return Value

string name of the concrete implementation

hasImpl($template)

Parameters

$template

void setEventListener(Doctrine_EventListener $listener)

Parameters

Doctrine_EventListener $listener

Return Value

void

Doctrine_Configurable addRecordListener($listener, $name = null)

addRecordListener

Parameters

$listener
$name

Return Value

Doctrine_Configurable this object

Doctrine_Configurable addListener($listener, $name = null)

addListener

Parameters

$listener
$name

Return Value

Doctrine_Configurable this object

mixed getAttribute(integer $attribute)

returns the value of an attribute

Parameters

integer $attribute

Return Value

mixed

void unsetAttribute(integer $attribute)

Unset an attribute from this levels attributes

Parameters

integer $attribute

Return Value

void

array getAttributes()

getAttributes returns all attributes as an array

Return Value

array

setCharset(string $charset)

Set the charset

Parameters

string $charset

mixed getCharset()

Get the charset

Return Value

mixed

setCollate(string $collate)

Set the collate

Parameters

string $collate

mixed getCollate()

Get the collate

Return Value

mixed $collate

void setParent(Doctrine_Configurable $component)

sets a parent for this configurable component the parent must be configurable component itself

Parameters

Doctrine_Configurable $component

Return Value

void

Doctrine_Configurable getParent()

getParent returns the parent of this component

Return Value

Doctrine_Configurable