/** * * @param string $name * @param closure $newMethod */ public function __construct($name, $newMethod) { Args::isString($name, 'name'); Args::callBackArgs($newMethod, 1, 'newMethod'); $this->name = $name; $this->newMethod = new SerializableClosure($newMethod); }
/** * Saves a resource to the cache. * @param type $name * @param type $resource * @param type $scope */ public static function saveResource($name, $resource, $scope) { Args::isString($name, 'name'); $instance = self::get(); $dir = $instance->getDirectoryForScope($scope); $instance->internalSaveResource($dir, $name, $resource); }
public function __construct($event, $callback) { parent::__construct(); Args::isString($event, 'event'); Args::callBackArgs($callback, 1, 'callback'); $this->event = $event; $this->callback = $callback; }
/** * * @param type $name * @param type $function * @param ... args the names of the arguments the javascript function should take */ public function __construct($name, $function) { parent::__construct($name); Args::isString($function, 'function'); $this->function = $function; $args = func_get_args(); for ($i = 2; $i < count($args); $i++) { array_push($this->args, $args[$i]); } }
/** * * @param Tab $tab * @param closure $newMethod */ public function addTab($tab, $newMethod = null) { if ($tab instanceof Tab) { array_push($this->tabs, $tab); } else { Args::isString($tab, 'tab'); Args::callBackArgs($newMethod, 1, 'newMethod'); array_push($this->tabs, new Tab($tab, $newMethod)); } }
/** * * @param type $name * @param type $function * @param ... args the names of the arguments the javascript function should take */ public function __construct($name, $callback, $function) { parent::__construct($name); Args::isString($function, 'function'); Args::callBackArgs($callback, 1, 'callback'); $this->callback = new SerializableClosure($callback); $this->function = $function; $args = func_get_args(); for ($i = 3; $i < count($args); $i++) { array_push($this->args, $args[$i]); } }
public function __construct($name) { Args::isString($name, 'name'); $this->name = $name; }
public function __construct($name, $value) { parent::__construct($name, $value); Args::isString($value, 'value'); $this->value = $value; }
public function __construct($url) { Args::isString($url, 'url'); $this->url = $url; }
public function __construct($attributeName, Model $value, $seperator) { parent::__construct($attributeName, $value); Args::isString($seperator, 'seperator'); $this->seperator = $seperator; }
/** * Create a new component. Any overrides of the constructor must call the super. * @param string $id the ID of this component */ public function __construct($id, Model $model = null) { Args::isString($id, 'id'); $this->id = $id; $this->model = $model; PiconApplication::get()->getComponentInstantiationListener()->onInstantiate($this); }
/** * * @param string $pattern The regular expression */ public function __construct($pattern) { Args::isString($pattern, 'pattern'); $this->pattern = $pattern; }
public function __construct($file, Identifier $identifier) { Args::isString($file, 'file'); $this->file = $file; $this->identifier = $identifier; }