Example #1
0
 /**
  * Factory method
  *
  * @param array $aRequired array of required
  * params
  *
  * @return object of this class
  */
 public static function factory(array $aRequired = array())
 {
     $a = null;
     $req = self::getRequestMethod();
     if ('POST' === $req) {
         $a = $_POST;
     } elseif ('GET' === $req) {
         $a = $_GET;
     }
     $o = new self($a);
     $o->setRequired($aRequired);
     $o->checkRequired();
     return $o;
 }