library mvc
Manage mvc calls
fernandopetry/mvc
Manage mvc calls
- Monday, June 11, 2018
- by fernandopetry
- Repository
- 1 Watchers
- 0 Stars
- 565 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 5 Versions
- 23 % Grown
Pacote de gerenciamento do MVC
Exemplo de htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?router=/$1 [QSA,L]
</IfModule>
Usage 1
<?php
use \Petry\MVC\Uri\Parse;
use \Petry\MVC\Uri\Param;
use \Petry\MVC\Uri\GetByURI;
$uri = new GetByURI('router');
$param = new Param($uri);
$parse = new Parse($param);
$parse->getController(); // Controller
$parse->getAction(); // Action
$parse->getParams(); // Params
Usage 2 | Facade
<?php
use \Petry\MVC\Uri\UriFacade;
$facade = new UriFacade('router');
$facade->getController(); // Controller
$facade->getAction(); // Action
$facade->getParams(); // Params
Install composer
$ composer require fernandopetry/mvc
Usage ControllerFactory
<?php
use \Petry\MVC\Uri\UriFacade;
try {
$factory = new \Petry\MVC\Controller\ControllerFactory(new UriFacade('router'),'Petry\Test\Controller');
$factory->factory();
}catch (Exception $e){
echo $e->getMessage();
}
dev-master
9999999-dev
Manage mvc calls
Sources
Download
BSD-3-Clause
The Requires
The Development Requires
php
mvc
fernandopetry
1.0.3
1.0.3.0
Manage mvc calls
Sources
Download
BSD-3-Clause
The Requires
The Development Requires
php
mvc
fernandopetry
1.0.2
1.0.2.0
Manage mvc calls
Sources
Download
BSD-3-Clause
The Requires
The Development Requires
php
mvc
fernandopetry
1.0.1
1.0.1.0
Manage mvc calls
Sources
Download
BSD-3-Clause
The Requires
The Development Requires
php
mvc
fernandopetry
1.0.0
1.0.0.0
Manage mvc calls
Sources
Download
BSD-3-Clause
The Requires
The Development Requires
php
mvc
fernandopetry