2017 © Pedro Peláez
 

library router

Routing module

image

kolserdav/router

Routing module

  • Monday, April 16, 2018
  • by kolserdav
  • Repository
  • 1 Watchers
  • 0 Stars
  • 21 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 17 % Grown

The README.md

The simple route module., (*1)

Installation, (*2)

~$composer require kolserdav/router, (*3)

[Make catalog src/Controller ...
Copy file src/Controller/TestController.php ...
Copy file src/Controller/ErrorPage.php ...
Rewrite namespaces ...
Make catalog /config/route ...
Copy file /config/route/routes.yaml]
or call..., (*4)

~$php vendor/kolserdav/router/install, (*5)

Using, (*6)

You must use a single access point., (*7)

index.php, (*8)

require 'vendor/autoload.php';

use Avir\Router\Route;

$router = new Route();
$router->route();

Add your routes in /config/route/routes.yaml, (*9)

index :                                           
      path : /                                    
      controller: IndexController::indexPublic    
users :
      path : /users/
      controller : User\UserConroller::usersPublic

Create custom controllers with methods.
For example:
IndexController::indexPublic
User\UserConroller::usersPublic, (*10)

When coinciding field 'path' with URI, the specified controller will be turned on. If URI contains of number, it will be available in the controller as..., (*11)

class SomeClass
{
    public $id

    public function someFunction(){
        $this->id;
    }
} 

Also you can transfer parameters to URI, (*12)

http://some.domains/some/uri/path?one=param1&two=param2&three=param3 //...

and catch them in the controller as
```php class SomeClass { public $params;, (*13)

public function someFunction(){
    $this->params; //[ one : param1, two : param2, three : param3 ]
}

} ``` It's all... Very simple!, (*14)

The Versions

16/04 2018

dev-master

9999999-dev

Routing module

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar kolserdav

16/04 2018

v0.2.1

0.2.1.0

Routing module

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar kolserdav

16/04 2018

dev-component

dev-component

Routing module

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar kolserdav

06/04 2018

v0.1.0

0.1.0.0

Routing module

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar kolserdav

06/04 2018

v0.2.0

0.2.0.0

Routing module

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar kolserdav

27/03 2018

v0.0.8

0.0.8.0

Routing module

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar kolserdav

27/03 2018

v0.0.8-beta

0.0.8.0-beta

Routing module

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar kolserdav