public function call($function, $params) {

		if(null === $this -> getAdapter()) {
			return trigger_error(sprintf('No database adapter was set in "%s"', __METHOD__), E_USER_ERROR);
		}

		if(null !== $function && false === is_string($function)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($function)), E_USER_ERROR);
		}

		if(false === is_array($params)) {
			return trigger_error(sprintf('Argument 2 passed to %s() must be of the type array, "%s" given', __METHOD__, gettype($params)), E_USER_ERROR);
		}

		$query  = sprintf('CALL %s(%s)', $function, implode(array_fill(0, count($params), '?'), ','));
		$output = $this -> getAdapter() -> query($query, $params) -> execute();

		return $output;
	}
public function call($function, $params) {

		if(null === $this -> getAdapter()) {
			return trigger_error(sprintf('No database adapter was set in "%s"', __METHOD__), E_USER_ERROR);
		}

		if(null !== $function && false === is_string($function)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($function)), E_USER_ERROR);
		}

		if(false === is_array($params)) {
			return trigger_error(sprintf('Argument 2 passed to %s() must be of the type array, "%s" given', __METHOD__, gettype($params)), E_USER_ERROR);
		}

		$query  = sprintf('CALL %s(%s)', $function, implode(array_fill(0, count($params), '?'), ','));
		$output = $this -> getAdapter() -> query($query, $params) -> execute();

		return $output;
	}
public function call ( $ function , $ params ) { if ( null === $ this -> getAdapter ( ) ) { return trigger_error ( sprintf ( 'No database adapter was set in "%s"' , __METHOD__ ) , E_USER_ERROR ) ; } if ( null !== $ function && false === is_string ( $ function ) ) { return trigger_error ( sprintf ( 'Argument 1 passed to %s() must be of the type string, "%s" given' , __METHOD__ , gettype ( $ function ) ) , E_USER_ERROR ) ; } if ( false === is_array ( $ params ) ) { return trigger_error ( sprintf ( 'Argument 2 passed to %s() must be of the type array, "%s" given' , __METHOD__ , gettype ( $ params ) ) , E_USER_ERROR ) ; } $ query = sprintf ( 'CALL %s(%s)' , $ function , implode ( array_fill ( 0 , count ( $ params ) , '?' ) , ',' ) ) ; $ output = $ this -> getAdapter ( ) -> query ( $ query , $ params ) -> execute ( ) ; return $ output ; }
Call stored procedure
@param string $function
@param array $params
@return boolean
Call stored procedure