/** * 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']); } } }
/** * 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; }