Example #1
0
 function __construct()
 {
     if ($_POST[__CLASS__]) {
         $form = Form::formWithArrayAndDelegate($_POST[__CLASS__], $this);
         $form->process();
     }
 }
Example #2
0
 public function __construct($context)
 {
     $context = json_decode($context, true);
     $validation = array();
     $validation['title'] = true;
     $validation['description'] = true;
     $validation['link'] = true;
     $validation['language'] = true;
     $validation['copyright'] = true;
     $validation['author'] = true;
     $validation['consumer'] = true;
     $data = array_intersect_key($context, $validation);
     $this->form = Form::formWithArrayAndDelegate($data, $this);
 }