final public function getService($identifier = null, array $config = array())
    {
        if (!isset($this->__service_container)) {
            throw new AnObjectException("Failed to call ".get_class($this)."::getService(). No service_container object defined.");
        }
        if (!isset($identifier)) {
            $result =  $this->__service_container;
        } else {
            $result =  $this->__service_container->get($identifier, $config);
        }
        return $result;
    }
final public function getService($identifier = null, array $config = array())
    {
        if (!isset($this->__service_container)) {
            throw new AnObjectException("Failed to call ".get_class($this)."::getService(). No service_container object defined.");
        }
        if (!isset($identifier)) {
            $result =  $this->__service_container;
        } else {
            $result =  $this->__service_container->get($identifier, $config);
        }
        return $result;
    }
final public function getService ( $ identifier = null , array $ config = array ( ) ) { if ( ! isset ( $ this -> __service_container ) ) { throw new AnObjectException ( "Failed to call " . get_class ( $ this ) . "::getService(). No service_container object defined." ) ; } if ( ! isset ( $ identifier ) ) { $ result = $ this -> __service_container ; } else { $ result = $ this -> __service_container -> get ( $ identifier , $ config ) ; } return $ result ; }
Get an instance of a class based on a class identifier only creating it
if it does not exist yet.

@param	string|object	$identifier The class identifier or identifier object
@param	array  			$config     An optional associative array of configuration settings.
@throws	AnObjectException if the service container has not been defined.
@return	object  		Return object on success, throws exception on failure
@see 	AnObjectServiceable
Get an instance of a class based on a class identifier only creating it if it does not exist yet .