| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
- namespace Tools\Database\Type;
- use Cake\Database\DriverInterface;
- use Cake\Database\Type\BaseType;
- /**
- * Do not convert input on marshal().
- */
- class ArrayType extends BaseType {
- /**
- * @param mixed $value
- * @return mixed
- */
- public function marshal($value) {
- return $value;
- }
- /**
- * Casts given value from a PHP type to one acceptable by a database.
- *
- * @param mixed $value Value to be converted to a database equivalent.
- * @param \Cake\Database\DriverInterface $driver Object from which database preferences and configuration will be extracted.
- * @return mixed Given PHP type casted to one acceptable by a database.
- */
- public function toDatabase($value, DriverInterface $driver) {
- return $value;
- }
- /**
- * Casts given value from a database type to a PHP equivalent.
- *
- * @param mixed $value Value to be converted to PHP equivalent
- * @param \Cake\Database\DriverInterface $driver Object from which database preferences and configuration will be extracted
- * @return mixed Given value casted from a database to a PHP equivalent.
- */
- public function toPHP($value, DriverInterface $driver) {
- return $value;
- }
- }
|