示例#1
0
文件: form.php 项目: 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']);
         }
     }
 }
示例#2
0
文件: cap.php 项目: 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;
 }