65 $this->argument_name = $this->argument->getArgumentName();
67 $this->default_value = $tag->attrs->default;
68 $this->notnull = $tag->attrs->notnull;
69 $this->filter = $tag->attrs->filter;
70 $this->min_length = $tag->attrs->min_length;
71 $this->max_length = $tag->attrs->max_length;
76 if(isset($this->default_value) || isset($this->notnull))
88 $validator .= sprintf(
'${\'%s_argument\'}->checkFilter(\'%s\');' .
"\n"
89 , $this->argument_name
95 $validator .= sprintf(
'${\'%s_argument\'}->checkMinLength(%s);' .
"\n"
96 , $this->argument_name
100 if($this->max_length)
102 $validator .= sprintf(
'${\'%s_argument\'}->checkMaxLength(%s);' .
"\n"
103 , $this->argument_name
107 if(isset($this->default_value))
109 $this->default_value =
new DefaultValue($this->argument_name, $this->default_value);
110 if($this->default_value->isSequence())
111 $validator .=
'$db = DB::getInstance(); $sequence = $db->getNextSequence(); ';
112 if($this->default_value->isOperation())
114 $validator .= sprintf(
'${\'%s_argument\'}->setColumnOperation(\'%s\');' .
"\n"
115 , $this->argument_name
116 , $this->default_value->getOperation()
119 $validator .= sprintf(
'${\'%s_argument\'}->ensureDefaultValue(%s);' .
"\n"
120 , $this->argument_name
121 , $this->default_value->toString()
126 $validator .= sprintf(
'${\'%s_argument\'}->checkNotNull();' .
"\n"
127 , $this->argument_name
__construct($tag, $argument)