improving class comments.
This commit is contained in:
@@ -49,10 +49,7 @@ class Filter {
|
|||||||
// "Before" filters may override the request cycle. For example, an authentication
|
// "Before" filters may override the request cycle. For example, an authentication
|
||||||
// filter may redirect a user to a login view if they are not logged in. Because of
|
// filter may redirect a user to a login view if they are not logged in. Because of
|
||||||
// this, we will return the first filter response if overriding is enabled.
|
// this, we will return the first filter response if overriding is enabled.
|
||||||
if ( ! is_null($response) and $override)
|
if ( ! is_null($response) and $override) return $response;
|
||||||
{
|
|
||||||
return $response;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -60,9 +60,8 @@ class Loader {
|
|||||||
array_push($segments, substr($segment, 0, strpos($segment, '.')));
|
array_push($segments, substr($segment, 0, strpos($segment, '.')));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Shift the module name off of the beginning of the array so we can locate the
|
// Since it is no part of the route directory structure, shift the module name off of the
|
||||||
// appropriate route file. Since the module name will not be part of the directory
|
// beginning of the array so we can locate the appropriate route file.
|
||||||
// structure, we need to get rid of it.
|
|
||||||
if (count($segments) > 0 and ACTIVE_MODULE !== 'application')
|
if (count($segments) > 0 and ACTIVE_MODULE !== 'application')
|
||||||
{
|
{
|
||||||
array_shift($segments);
|
array_shift($segments);
|
||||||
|
|||||||
@@ -52,10 +52,9 @@ class Route {
|
|||||||
{
|
{
|
||||||
$response = null;
|
$response = null;
|
||||||
|
|
||||||
// The callback may be in array form, meaning it has attached filters or is named.
|
// The callback may be in array form, meaning it has attached filters or is named and we
|
||||||
// However, the callback may also simply be a closure. If it is just a closure,
|
// will need to evaluate it further to determine what to do. If the callback is just a
|
||||||
// we can execute it here. Otherwise, we will need to evaluate the route for any
|
// closure, we can execute it now and return the result.
|
||||||
// filters that need to be called.
|
|
||||||
if (is_callable($this->callback))
|
if (is_callable($this->callback))
|
||||||
{
|
{
|
||||||
$response = call_user_func_array($this->callback, $this->parameters);
|
$response = call_user_func_array($this->callback, $this->parameters);
|
||||||
|
|||||||
Reference in New Issue
Block a user