A simple view component.

v1.0.0 2022-09-02 19:03 UTC

This package is auto-updated.

Last update: 2024-10-30 01:43:03 UTC


README

Maintainer Source Code PHP from Packagist Latest Version Software License Build Quality Score Total Downloads

Small, simple and uncomplicated. The view is a PHP view component with abstraction for MVC.

Pequeno, simples e descomplicado. O view é um componente de views PHP com abstração para MVC.

Highlights

  • Simple installation (Instalação simples)
  • Composer ready and PSR-2 compliant (Pronto para o composer e compatível com PSR-2)

Installation

View is available via Composer:

"marcolamr/view": "^1.0"

or run

composer require marcolamr/view

Documentation

For details on how to use, see a sample folder in the component directory. In it you will have an example of use for each class. It works like this:

Para mais detalhes sobre como usar, veja uma pasta de exemplo no diretório do componente. Nela terá um exemplo de uso para cada classe. Ele funciona assim:

Getting Started:

<?php

use MarcolaMr\View\View;

require __DIR__ . "/vendor/autoload.php";

$view = new View(__DIR__ . "/resources/views");

$view->init([
    "url" => "http://localhost"
]);

$content = $view->render("home", [
    "name" => "Test Name"
]);

echo $content;