2017 © Pedro Peláez
 

library mvc

Manage mvc calls

image

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

The README.md

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();
}

The Versions

11/06 2018

dev-master

9999999-dev

Manage mvc calls

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.6

 

The Development Requires

php mvc fernandopetry

11/06 2018

1.0.3

1.0.3.0

Manage mvc calls

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.6

 

The Development Requires

php mvc fernandopetry

07/06 2018

1.0.2

1.0.2.0

Manage mvc calls

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.6

 

The Development Requires

php mvc fernandopetry

07/07 2017

1.0.1

1.0.1.0

Manage mvc calls

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.6

 

The Development Requires

php mvc fernandopetry

30/06 2017

1.0.0

1.0.0.0

Manage mvc calls

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.6

 

The Development Requires

php mvc fernandopetry