stag/piha

There is no license information available for the latest version (dev-master) of this package.

Piha php micro framework

dev-master 2016-06-04 20:53 UTC

This package is auto-updated.

Last update: 2022-01-21 14:30:21 UTC


README

This framework work on PHP 5.3+ and MySQL (Bitrix as optional). As optional you can include this framework as library to your project.

68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f7665726167652d37302532352d79656c6c6f77677265656e2e737667

68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d352e332d626c75652e737667

Features

1) Own fast and simple ORM and SQL builder. With many features. ```php

$q = new CQuery("tableName", array("ID", "NAME", "CODE")); $q->all("ID", "CODE"); // group by CODE

class MyModel { public $_name = 'tableName'; public $_columns = array( "ID" => array("type"=>"pk"), "NAME" => array("type"=>"string"), "CODE" => array("type" =>"string") ) }

MyModel::GetCode(1); MyModel::q()->where(1)->one("CODE"); MyModel::q()->where(array("ID" => 1))->select("ID")->one("CODE"); // equal results

// Simple access MyModel::q(); //CQuery MyModel::schema(); // CMigration MyModel::m(); // CModel

2) Simple forms and model forms with autocomplete and html5 support
```php
// in controller
$form = CForm::post('MyForm');
if ($form->isSubmit()) {
    echo $form->getValue("DATE_FROM");
}

// in view
echo
$form->start(array("action" => $this->url())),
$form->text(array("NAME" => "TITLE")),
$form->date(array("NAME" => "DATE_FROM")),
$form->submit(array("value" => "Search")),
$form->end();