Git Product home page Git Product logo

skeleton's Introduction

Bluz, a lightweight PHP Framework

Easy to setup, easy to use. Example application

Build Status

Installation

Bluz works with PHP 5.4 or later and MySQL 5.1 or later

First you should clone Bluz skeleton project from github repository,

git clone git://github.com/bluzphp/skeleton.git

or download the latest version from here and extract it.

Then you need to download composer.phar to the project folder:

cd skeleton
curl -s https://getcomposer.org/installer | php

and install dependencies with the following command:

php composer.phar install

Create symlink to public directory (required FollowSymlinks option):

ln -s /path/to/public /var/www/htdocs

Restore database structure from structure.ddl file (use InnoDB as the Default MySQL Storage Engine for avoid "Error Code: 1071"!). Restore default database data from dump.sql

Edit your own configuration file /path/to/application/configs/app.dev.php

Usage

Controller:

<?php
return
/**
 * @privilege View-User-Profile
 * @cache 5 minutes
 * @param integer $id
 * @return \closure
 */
function($id) use ($view) {
    /**
     * @var Application $this
     * @var View $view
     */
     $view->user = Users\Table::findRow($id);
};

View:

<h2><?=$user->login?></h2>

Model:

<?php
namespace Application\Users;
class Table extends \Bluz\Db\Table
{
    protected $table = 'users';
    protected $primary = array('id');
}
<?php
namespace Application\Users;
/**
 * @property integer $id
 * @property string $login
 */
class Row extends \Bluz\Db\Row {

}

Documentation

License

Read LICENSE file

Vendors

skeleton's People

Contributors

antonshevchuk avatar bashmach avatar baziak avatar dyachenko avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.