owner888/kaliphp

A MVC PHP framework for easily building fast

Installs: 319

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 1

Language:JavaScript


README

KaliPHP is a fast, lightweight PHP framework. In an age where frameworks are a dime a dozen, We believe that KaliPHP will stand out in the crowd. It will do this by combining all the things you love about the great frameworks out there, while getting rid of the bad.

Requires

PHP 7.1 or Higher

Installation

composer require owner888/kaliphp
# If a template is needed
composer require smarty/smarty

Basic Usage

DB

<?php
require_once __DIR__ . '/vendor/autoload.php';
// The _init() method will execute when the class is loaded.
autoloader::register();
use kaliphp\db;

// query
db::query($sql)->execute($is_master = false);

// select
db::select(['id', 'name'])->from('user')->execute();

// insert
// INSERT INTO `user`(`name`,`email`,`password`)
// VALUES ("John Random", "john@example.com", "s0_s3cr3t")
list($insert_id, $rows_affected) = db::insert('user')->set(array(
    'name'      => 'John Random',
    'email'     => 'john@example.com',
    'password'  => 's0_s3cr3t',
))->execute();

// update
// UPDATE `user` SET `name` = "John Random" WHERE `id` = "2";
$rows_affected = db::update('user')
    ->value("name", "John Random")
    ->where('id', '=', '2')
    ->execute();

// delete
// DELETE FROM `user` WHERE `email` LIKE "%@example.com"
$rows_affected = db::delete('users')->where('email', 'like', '%@example.com')->execute(); // (int) 7

Documentation

http://doc.kaliphp.com

LICENSE

KaliPHP is released under the MIT license.