Exemple #1
0
 public function __construct()
 {
     // id
     $id = new Id('id');
     $id->setRequired(true);
     $this->add($id);
     // name
     $name = new Text('name', 0, 250);
     $name->setRequired(false);
     $this->add($name);
     // type
     $type = new Int('type');
     $type->setRequired(false);
     $this->add($type);
 }
Exemple #2
0
 public function __construct()
 {
     // id
     $id = new Id('id');
     $id->setRequired(false);
     $this->add($id);
     // name
     $name = new Text('name', 1, 60);
     $name->setRequired(false);
     $this->add($name);
     // value
     $value = new Text('value', 1, 255);
     $value->setRequired(false);
     $this->add($value);
 }
Exemple #3
0
 public function __construct(WordKey $wordKeyElement)
 {
     // id
     $id = new Id('id');
     $id->setRequired(true);
     $this->add($id);
     // langId
     $langId = new Id('langId');
     $langId->setRequired(true);
     $this->add($langId);
     // key
     $this->add($wordKeyElement);
     // translate
     $translate = new Text('translate', 1, 500);
     $translate->setRequired(true);
     $translate->getFilterChain()->attachByName('StringTrim');
     $this->add($translate);
 }