public function toDatabase($value, Driver $driver) {
		if (is_array($value)) {
			$value = $value['year'];
		}
		if ($value === null || !(int)$value) {
			return null;
		}
		return $value;
	}
public function toDatabase($value, Driver $driver) {
		if (is_array($value)) {
			$value = $value['year'];
		}
		if ($value === null || !(int)$value) {
			return null;
		}
		return $value;
	}
public function toDatabase ( $ value , Driver $ driver ) { if ( is_array ( $ value ) ) { $ value = $ value [ 'year' ] ; } if ( $ value === null || ! ( int ) $ value ) { return null ; } return $ value ; }
Convert binary data into the database format.

Binary data is not altered before being inserted into the database.
As PDO will handle reading file handles.

@param int|string|array|null $value The value to convert.
@param \Cake\Database\Driver $driver The driver instance to convert with.
@return int|null
Convert binary data into the database format .