Esempio n. 1
0
 /**
  * Applies validator
  *
  * @return  boolean     success
  */
 public function main()
 {
     include_once NX_PATH_LIB . 'gd/gdimage.php';
     $gd = new GdImage();
     $this->message = 'is an invalid image type. supported types are: .' . implode($gd->getSupportedTypes(), ', .');
     $data = Nexista_Path::get($this->params['var'], 'flow');
     if (!empty($data)) {
         $this->result = $gd->isSupported($data);
         return true;
     }
     $this->setEmpty();
     return true;
 }