Example #1
0
File: form.php Project: 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']);
         }
     }
 }
Example #2
0
File: cap.php Project: 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;
 }