Ejemplo n.º 1
0
 /**
  * Converts a given value into the proper type based on a given schema definition.
  *
  * @see lithium\data\source\Database::schema()
  *
  * @param mixed $value  The value to be converted. Arrays will be recursively converted.
  * @param array $schema Formatted array from `lithium\data\source\Database::schema()`
  *
  * @return mixed Value with converted type.
  */
 public function value($value, array $schema = [])
 {
     if (($result = parent::value($value, $schema)) !== null) {
         return $result;
     }
     return $this->connection->quote((string) $value);
 }