ElementInteger::getSchema(array('default' => false, 'null' => true)), 'maxlength' => ElementInteger::getSchema(array('default' => false, 'null' => true)), 'default' => ElementBoolean::getSchema(array('default' => false, 'null' => true)), 'null' => ElementBoolean::getSchema(array('default' => true, 'null' => true)) )); } public static function getSchema ( $params = array() ) { $params['type'] = 'string'; return $params; } public static function invalid ( $schema, $value, $data = array() ) { if ( $error = parent::invalid($schema, $value, $data) ) return $error; if ( is_null($value) || is_string($value) ) return false; return 'Value is not a string !'; } public static function apply ( $schema, $value, $data = array() ) { return (string) parent::apply($schema, $value, $data); } } ?>