mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 00:37:52 +00:00
Development
- Optimised Input and Input-related features. - Removed InputCollection class. - Changed more foreach to for. - Updated documentation.
This commit is contained in:
@@ -59,7 +59,12 @@ class RouteController extends LoadableRoute implements IControllerRoute
|
||||
|
||||
/* Remove requestType from method-name, if it exists */
|
||||
if ($method !== null) {
|
||||
foreach (static::$requestTypes as $requestType) {
|
||||
$max = count(static::$requestTypes);
|
||||
|
||||
for ($i = 0; $i < $max; $i++) {
|
||||
|
||||
$requestType = static::$requestTypes[$i];
|
||||
|
||||
if (stripos($method, $requestType) === 0) {
|
||||
$method = substr($method, strlen($requestType));
|
||||
break;
|
||||
|
||||
@@ -19,8 +19,12 @@ class RouteGroup extends Route implements IGroupRoute
|
||||
public function matchDomain(Request $request)
|
||||
{
|
||||
if (count($this->domains) > 0) {
|
||||
foreach ($this->domains as $domain) {
|
||||
|
||||
$max = count($this->domains);
|
||||
|
||||
for ($i = 0; $i < $max; $i++) {
|
||||
|
||||
$domain = $this->domains[$i];
|
||||
$parameters = $this->parseParameters($domain, $request->getHost(), '.*');
|
||||
|
||||
if ($parameters !== null) {
|
||||
|
||||
Reference in New Issue
Block a user