2017 © Pedro Peláez
 

library directly

micro-framework to provider web pages quickly

image

wallrio/directly

micro-framework to provider web pages quickly

  • Friday, May 18, 2018
  • by wallrio
  • Repository
  • 1 Watchers
  • 0 Stars
  • 9 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 13 % Grown

The README.md

Directly

Micro-framework PHP to provider web pages quickly, (*1)

Installation

It's recommended that you use Composer to install Directly., (*2)

$ composer require wallrio/directly "*"

Usage

Create an index.php file with the following contents:, (*3)

<?php

require 'vendor/autoload.php';

use directly\Directly as Directly;

$directly = new Directly('application');
$directly->run('/');

Create an .htaccess file with the following contents:, (*4)

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f                     
RewriteRule ^(.+)$ index.php [L]                
</IfModule>

Class Directly()

  • new Directly(DIRECTORY-YOUR-APP);, (*5)

    DIRECTORY-YOUR-APP  =  specifies the application directory (optional)
  • $directly->run(ROUTE);, (*6)

    ROUTE   =   specifies an initial route (optional)
  • Optionally you can force a home directory for your files, use the attribute below for this:, (*7)

    $directly->publicDir = 'DIRECTORY-PUBLIC';, (*8)

    DIRECTORY-PUBLIC    =   specify a directory after the directory of your application

    example

    $directly->publicDir = 'assets';
    

Struct directory

    /your-directory-project
        |
        |--application/
        |   |
        |   |--error
        |   |    |--404
        |   |        |--view.php
        |   |
        |   |--global
        |   |    |--header.php
        |   |    |--footer.php
        |   |    
        |   |--inc
        |   |    |--menu.php
        |   |
        |   |--view
        |       |--home
        |          |--view.php
        |       |--about
        |          |--view.php
        |       |--contact
        |          |--view.php
        |
        |--- .htaccess
        |--- index.php

Other options

$directly->publicDir = 'assets';

Short tags

[=inc:menu.php=] =   includes no document the contents of the menu.php file located in the directory /application/inc

[=inc-route:meta.php=] = includes no document the contents of the menu.php file located in the directory /application/view/CURRENT-PAGE/meta.php

[=global:FILE_NAME=] = includes no document the contents of the menu.php file located in the directory /application/global/FILE_NAME.php

[=domain:url=] = replace to url of domain    

License

The Directly Framework is licensed under the MIT license. See License File for more information., (*9)

The Versions

18/05 2018

dev-master

9999999-dev http://wallrio.com

micro-framework to provider web pages quickly

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

pages web view micro-framework quickly

20/03 2018

v0.5

0.5.0.0 http://wallrio.com

micro-framework to provider web pages quickly

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

pages web view micro-framework quickly

16/03 2018

v0.4

0.4.0.0 http://wallrio.com

micro-framework to provider web pages quickly

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

pages web view micro-framework quickly

16/03 2018

v0.3

0.3.0.0 http://wallrio.com

micro-framework to provider web pages quickly

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

pages web view micro-framework quickly

16/03 2018

v0.2

0.2.0.0 http://wallrio.com

micro-framework to provider web pages quickly

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

pages web view micro-framework quickly

14/03 2018

v0.1

0.1.0.0 http://wallrio.com

micro-framework to provider web pages quickly

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

pages web view micro-framework quickly