61 $this->controller = $array[
"controller"];
62 $this->action = $array[
"action"];
63 $this->name = isset($array[
"name"]) ? $array[
"name"] :
'';
64 $this->cache = isset($array[
"cache"]) ? $array[
"cache"] :
false;
65 $this->duration = isset($array[
"duration"]) ? $array[
"duration"] :
false;
66 if (isset($array[
"parameters"]) && \
sizeof($array[
"parameters"]) > 0) {
67 if (\class_exists($this->controller)) {
68 if (\method_exists($this->controller, $this->action)) {
69 $method = new \ReflectionMethod($this->controller, $this->action);
70 $params = $method->getParameters();
71 foreach ($array[
"parameters"] as $paramIndex) {
72 if ($paramIndex ===
"*") {
74 if ($pName !==
false) {
75 $this->parameters[] =
"..." . $pName;
78 $index = \intval(\str_replace(
"~",
"", $paramIndex));
79 if (isset($params[$index])) {
80 if (\substr($paramIndex, 0, 1) ===
"~")
81 $this->parameters[] = $params[$index]->getName();
83 $this->parameters[] = $params[$index]->getName() .
"*";
88 $this->messages[] =
"The method <b>" . $this->action .
"</b> does not exists in the class <b>" . $this->controller .
"</b>.\n";
91 $this->messages[
$this->controller] =
"The class <b>" . $this->controller .
"</b> does not exist.\n";