Lightweight PHP framework
Lightweight PHP framework without boilerplate of big frameworks.
pclib
somewhere at your webroot.install/pclib_*.sql
. Import this sql-dump into your database.or install it using composer:
composer require lenochware/pclib
Render form
require 'vendor/autoload.php'; // or 'pclib/pclib.php' without composer
$app = new PCApp('test-app');
$form = new PCForm('tpl/form-template.tpl');
print $form;
Connect to database and show datagrid with data
require 'vendor/autoload.php';
$app = new PCApp('test-app');
$app->db = new PCDb('pdo_mysql://user:password@localhost/database-name');
$grid = new PCGrid('tpl/grid-template.tpl');
$grid->setQuery('SELECT * FROM products');
print $grid;
For more examples see http://pclib.brambor.net/
This source code is licensed under the MIT license found in the LICENSE file
in the root directory of this source tree.