baser/models/datasources/dbo/dbo_postgres_ex.php
/**
 * Prepares a value, or an array of values for database queries by quoting and escaping them.
 *
 * @param mixed $data A value or an array of values to prepare.
 * @param string $column The column into which this data will be inserted
 * @param boolean $read Value to be used in READ or WRITE context
 * @return mixed Prepared value or array of values.
 * @access private
 */
Prepares a value, or an array of values for database queries by quoting and escaping them.
@param mixed $data A value or an array of values to prepare.
@param string $column The column into which this data will be inserted
@param boolean $read Value to be used in READ or WRITE context
@return mixed Prepared value or array of values.
@access private
Prepares a value or an array of values for database queries by quoting and escaping them . @param mixed $data A value or an array of values to prepare . @param string $column The column into which this data will be inserted @param boolean $read Value to be used in READ or WRITE context @return mixed Prepared value or array of values . @access private
function __value($data, $column = null, $read = true) {
		if (is_array($data) && !empty($data)) {
			return array_map(
				array(&$this, 'value'),
				$data, array_fill(0, count($data), $column), array_fill(0, count($data), $read)
			);
		} elseif (is_object($data) && isset($data->type)) {
			if ($data->type == 'identifier') {
				return $this->name($data->value);
			} elseif ($data->type == 'expression') {
				return $data->value;
			}
		} elseif (in_array($data, array('{$__cakeID__$}', '{$__cakeForeignKey__$}'), true)) {
			return $data;
		} else {
			return null;
		}
	}
function __value ( $ data , $ column = null , $ read = true ) { if ( is_array ( $ data ) && ! empty ( $ data ) ) { return array_map ( array ( & $ this , 'value' ) , $ data , array_fill ( 0 , count ( $ data ) , $ column ) , array_fill ( 0 , count ( $ data ) , $ read ) ) ; } elseif ( is_object ( $ data ) && isset ( $ data -> type ) ) { if ( $ data -> type == 'identifier' ) { return $ this -> name ( $ data -> value ) ; } elseif ( $ data -> type == 'expression' ) { return $ data -> value ; } } elseif ( in_array ( $ data , array ( '{$__cakeID__$}' , '{$__cakeForeignKey__$}' ) , true ) ) { return $ data ; } else { return null ; } }
Prepares a value, or an array of values for database queries by quoting and escaping them.
Prepares a value or an array of values for database queries by quoting and escaping them .