public function toDatabase($value, Driver $driver)
    {
        if ($value === null || $value === '') {
            return null;
        }

        return parent::toDatabase($value, $driver);
    }
public function toDatabase($value, Driver $driver)
    {
        if ($value === null || $value === '') {
            return null;
        }

        return parent::toDatabase($value, $driver);
    }
public function toDatabase ( $ value , Driver $ driver ) { if ( $ value === null || $ value === '' ) { return null ; } return parent :: toDatabase ( $ value , $ driver ) ; }
Casts given value from a PHP type to one acceptable by database

@param mixed $value value to be converted to database equivalent
@param \Cake\Database\Driver $driver object from which database preferences and configuration will be extracted
@return string|null
Casts given value from a PHP type to one acceptable by database