src/DB/StatementCollection.php
public function addComponent( $name, $data = array() )
	{
		if( !method_exists( $this, $name ) )
			throw new BadMethodCallException( 'Component "'.$name.'" is not defined.' );
		$array = $this->$name( $data );
		if( count( $array ) )
		{
			if( isset( $array[0] ) )
				$this->builder->addKeys( $array[0] );
			if( isset( $array[1] ) )
				$this->builder->addTables( $array[1] );
			if( isset( $array[2] ) )
				$this->builder->addConditions( $array[2] );
			if( isset( $array[3] ) )
				$this->builder->addGroupings( $array[3] );
		}
	}
public function addComponent( $name, $data = array() )
	{
		if( !method_exists( $this, $name ) )
			throw new BadMethodCallException( 'Component "'.$name.'" is not defined.' );
		$array = $this->$name( $data );
		if( count( $array ) )
		{
			if( isset( $array[0] ) )
				$this->builder->addKeys( $array[0] );
			if( isset( $array[1] ) )
				$this->builder->addTables( $array[1] );
			if( isset( $array[2] ) )
				$this->builder->addConditions( $array[2] );
			if( isset( $array[3] ) )
				$this->builder->addGroupings( $array[3] );
		}
	}
public function addComponent ( $ name , $ data = array ( ) ) { if ( ! method_exists ( $ this , $ name ) ) throw new BadMethodCallException ( 'Component "' . $ name . '" is not defined.' ) ; $ array = $ this -> $ name ( $ data ) ; if ( count ( $ array ) ) { if ( isset ( $ array [ 0 ] ) ) $ this -> builder -> addKeys ( $ array [ 0 ] ) ; if ( isset ( $ array [ 1 ] ) ) $ this -> builder -> addTables ( $ array [ 1 ] ) ; if ( isset ( $ array [ 2 ] ) ) $ this -> builder -> addConditions ( $ array [ 2 ] ) ; if ( isset ( $ array [ 3 ] ) ) $ this -> builder -> addGroupings ( $ array [ 3 ] ) ; } }
Add a parameterized Component to Statement Builder.
@access		public
@param		string		$name		Name of collected Statement Component
@param		array		$data		Parameters for Statement Component
@return		void
Add a parameterized Component to Statement Builder .