All Projects → hfcorriez → Pagon

hfcorriez / Pagon

Licence: mit
Modern PHP Framework

Labels

Projects that are alternatives of or similar to Pagon

Matrixslow
A simple deep learning framework in pure python for purpose of learning in DL
Stars: ✭ 193 (-3.98%)
Mutual labels:  framework
Antch
Antch, a fast, powerful and extensible web crawling & scraping framework for Go
Stars: ✭ 198 (-1.49%)
Mutual labels:  framework
Messenger4j
A Java library for building Chatbots on the Facebook Messenger Platform - easy and fast.
Stars: ✭ 199 (-1%)
Mutual labels:  framework
Claf
CLaF: Open-Source Clova Language Framework
Stars: ✭ 196 (-2.49%)
Mutual labels:  framework
Typescene
Strongly typed front-end framework
Stars: ✭ 197 (-1.99%)
Mutual labels:  framework
Flamingo
Flamingo Framework and Core Library. Flamingo is a go based framework for pluggable web projects. It is used to build scalable and maintainable (web)applications.
Stars: ✭ 198 (-1.49%)
Mutual labels:  framework
Grial
A Node.js framework for creating GraphQL API servers easily and without a lot of boilerplate.
Stars: ✭ 194 (-3.48%)
Mutual labels:  framework
Pydark
PyDark is a 2D and Online Multiplayer video game framework written on-top of Python and PyGame.
Stars: ✭ 201 (+0%)
Mutual labels:  framework
Aleph.js
The Full-stack Framework in Deno.
Stars: ✭ 3,448 (+1615.42%)
Mutual labels:  framework
Duaef duik
Duduf After Effects Framework | Duik
Stars: ✭ 197 (-1.99%)
Mutual labels:  framework
Ivory
IVORY is simple and highly customizable CSS framework, gives you all to build your pages faster and easier.
Stars: ✭ 196 (-2.49%)
Mutual labels:  framework
Asu
facebook hacking toolkit
Stars: ✭ 197 (-1.99%)
Mutual labels:  framework
Xuui
xLua的mvvm框架,支持ugui,ngui,fairyGUI。。。
Stars: ✭ 199 (-1%)
Mutual labels:  framework
Miscnn
A framework for Medical Image Segmentation with Convolutional Neural Networks and Deep Learning
Stars: ✭ 194 (-3.48%)
Mutual labels:  framework
Framework
The li₃ fullstack distribution, including overarching directory layout, starting application, and a copy of the framework.
Stars: ✭ 199 (-1%)
Mutual labels:  framework
Egg Core
A core Pluggable framework based on koa.
Stars: ✭ 194 (-3.48%)
Mutual labels:  framework
Asphalt
Asphalt application framework (core)
Stars: ✭ 198 (-1.49%)
Mutual labels:  framework
Barekit
A bare minimum responsive framework
Stars: ✭ 201 (+0%)
Mutual labels:  framework
Chimee
a video player framework aims to bring wonderful experience on browser
Stars: ✭ 2,332 (+1060.2%)
Mutual labels:  framework
Chunkstories
Somewhat fancy blocky game engine written in Kotlin
Stars: ✭ 199 (-1%)
Mutual labels:  framework

Pagon

Pagon is Modern PHP framework with elegant syntax. It also allow you to build RESTful web applications quickly and easily.

Other languages: 中文文档

Quick Started

Installation

Pagon use Composer to manage its dependencies. First you need to have Composer installed globally.

You can also download a copy of the composer.phar in your repository's root, run a command such as the following:

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

via Download/Git

Download source files from Github or clone from Github

$ git clone [email protected]:hfcorriez/pagon.git myapp
$ composer install # php composer.phar install

Via Composer Create-Project

$ composer create-project pagon/pagon myapp # php composer.phar ...

Debugger server

You can use Pagon built-in debugger server for rapid development under development environment. please use a Nginx or Apache server for production environment.

$ ./bin/pagon serve [-p|--port <PORT>]
Pagon serve at http://127.0.0.1:5000

Configuration

All of the configuration files for the Pagon are stored in the app/config directory.

Optional attributes

mode        # Runing mode
debug       # Debug mode
views       # Template directory
buffer      # Open a buffer or not
timezone    # timezone (default: UTC)
charset     # charset (default: UTF-8)
autoload    # Auto load directory
error       # Handle error or not
routes      # Routes
names       # Router name, auto created
alias       # Class aliases, for short class name
namespaces  # Namespaces
engines     # Template engines
errors      # Default errors
stacks      # stacks
mounts      # mounts
bundles     # bundles
locals      # locals
url_rewrite # Url rewrite or not

Routing

To get started, let's create our first route. In Pagon, the simplest route is a route to a Closure.

// Init app
$app = Pagon::create();

// Routing with a callback function
$app->get('/', function($req, $res) {
  $res->render('index.php');
});

// Routing with a class method
$app->get('/users/:id', 'Web\\User');

// Specify named parameters in your routes
$app->post('/users/:id(/:op)', 'Web\\UserOperator');

// Run app
$app->run();

Database

Pagon ships with a superb ORM: Paris. More detailed documentation and examples, please check out Paris Doc.

Simple Example

$users = \Model\User::dispense()->where('status', 1)->find_many();

Migration

Init Database schema

./bin/cli db:init

Will execute file app/migrations/schema.sql

Migrate, Status

$ ./bin/cli db:generate AddUserLoginTime
+f ./migrations/20141208030747_AddUserLoginTime.php

$ ./bin/cli db:status

 Status   Migration ID    Migration Name
-----------------------------------------
   down  20141208030747  AddUserLoginTime

$ ./bin/cli db:migrate
 == 20141208030747 AddUserLoginTime migrating
 == 20141208030747 AddUserLoginTime migrated 0.0084s

Except init command, all the other commands map to phpmig to execute。

Cli

Manage PHP shell for *unix console

./bin/cli

$app->command('db\:init', '\Command\DB\Init');
$app->command('queue\:start', '\Command\Queue\Start');

Execution

$ ./bin/cli db:init
$ ./bin/cli queue:start

Showcase

iNews: https://github.com/Trimidea/inews

License

Copyright (c) 2014-2015 hfcorriez. MIT Licensed, see LICENSE for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].