ElementString::getSchema(array('default' => 'Y-m-d', 'null' => 'false')), 'default' => ElementBoolean::getSchema(array('default' => false, 'null' => true)), 'null' => ElementBoolean::getSchema(array('default' => true, 'null' => true)) )); } public static function getSchema ( $params = array() ) { $params['type'] = 'date'; return $params; } public function apply ( $schema, $value, $data = array() ) { if ( $value ) return parent::apply($schema, $value, $data); return uniqid(true); } } ?>