Exemplo n.º 1
0
Arquivo: form.php Projeto: pr1001/CAP
 /**
  * setCallbacks function.
  * 
  * Loop through all the elements and register all provided closures with the underlying CAP system.
  *
  * @access protected
  * @return void
  */
 protected function setCallbacks()
 {
     foreach ($this->elements as $element) {
         if (array_key_exists('closure', $element->toArray()) && !is_null($element['closure'])) {
             CAP::register($element['closure'], $element['name']);
         }
     }
 }
Exemplo n.º 2
0
Arquivo: cap.php Projeto: pr1001/CAP
 /**
  * setScope function.
  * 
  * A simple helper message for setting the current scope (i.e. form). Perhaps in the future this will do more.
  *
  * @static
  * @param string $id
  * @return void
  */
 static function setScope($id)
 {
     self::$scope = $id;
 }