Public Member Functions | Protected Attributes

Robo47_Application_Resource_ObjectMulti Class Reference

List of all members.

Public Member Functions

 getObject ($name)
 Returns an object.
 getObjects ()
 Returns an array with all objects.
 init ()

Protected Attributes

 $_objects = array()

Detailed Description

Definition at line 31 of file ObjectMulti.php.


Member Function Documentation

Robo47_Application_Resource_ObjectMulti::getObject ( name  ) 

Returns an object.

Returns:
object

Definition at line 63 of file ObjectMulti.php.

    {
        if (isset($this->_objects[$name])) {
            return $this->_objects[$name];
        } else {
            $message = 'Object \'' . $name . '\' doesn\'t exist';
            throw new Robo47_Application_Resource_Exception($message);
        }
    }

Robo47_Application_Resource_ObjectMulti::getObjects (  ) 

Returns an array with all objects.

Returns:
array

Definition at line 78 of file ObjectMulti.php.

    {
        return $this->_objects;
    }

Robo47_Application_Resource_ObjectMulti::init (  ) 

Definition at line 43 of file ObjectMulti.php.

    {
        if (!empty($this->_options)) {
            foreach ($this->_options as $name => $options) {
                $resource = new Robo47_Application_Resource_Object($options);
                $resource->init();
                $this->_objects[$name] = $resource->getObject();
            }
        } else {
            $message = 'Empty options in resource ' .
                'Robo47_Application_Resource_ObjectMulti.';
            throw new Robo47_Application_Resource_Exception($message);
        }
    }


Member Data Documentation

Robo47_Application_Resource_ObjectMulti::$_objects = array() [protected]

Definition at line 38 of file ObjectMulti.php.


The documentation for this class was generated from the following file: