src/Alg/Object/Delegation.php
public function addObject( $object )
	{
		if( !is_object( $object ) )
			throw new InvalidArgumentException( 'Not an object given' );
		$reflection	= new ReflectionObject( $object );
		$methods	= $reflection->getMethods();
		foreach( $methods as $method )
		{
			if( in_array( $method->name, $this->delegableMethods ) )
				throw new RuntimeException( 'Method "'.$method->name.'" is already set' );
			$this->delegableMethods[]	= $method->name;
		}
		$this->delegableObjects[]	= $object;
	}
public function addObject( $object )
	{
		if( !is_object( $object ) )
			throw new InvalidArgumentException( 'Not an object given' );
		$reflection	= new ReflectionObject( $object );
		$methods	= $reflection->getMethods();
		foreach( $methods as $method )
		{
			if( in_array( $method->name, $this->delegableMethods ) )
				throw new RuntimeException( 'Method "'.$method->name.'" is already set' );
			$this->delegableMethods[]	= $method->name;
		}
		$this->delegableObjects[]	= $object;
	}
public function addObject ( $ object ) { if ( ! is_object ( $ object ) ) throw new InvalidArgumentException ( 'Not an object given' ) ; $ reflection = new ReflectionObject ( $ object ) ; $ methods = $ reflection -> getMethods ( ) ; foreach ( $ methods as $ method ) { if ( in_array ( $ method -> name , $ this -> delegableMethods ) ) throw new RuntimeException ( 'Method "' . $ method -> name . '" is already set' ) ; $ this -> delegableMethods [ ] = $ method -> name ; } $ this -> delegableObjects [ ] = $ object ; }
Composes an Object.
@access		public
@param		object		$object			Object
@return		int							Number of all added Objects
@throws		InvalidArgumentException	if no object given
Composes an Object .