-
Notifications
You must be signed in to change notification settings - Fork 2
/
README
35 lines (25 loc) · 835 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
PHPSalama - A PHP 5.3+ ORM
=========================
Version 0.1
Salama is a PHP 5.3+ ORM built with a mission. Play to the strengths of PHP, offer convenient syntax, be fast and flexible.
class User extends Model {
var $name = 'type=CharField,maxLength=50'
}
$user = new User();
$user->name = "BobbyTables";
$user->save()
$users = User::all();
for($users as $user) {
echo $user->name;
}
$user = User::where(q::name('BobbyTables'))->limit(1);
echo $user->name;
Installation
============
require '/installation-path/salama/Salama.php';
$settings = array('config_dir'=>dirname(__FILE__).'/config');
Salama::bootstrap($settings);
See tests/config for required configuration.
Usage
=====
See tests/queries/QueryTest.php for a primer until better documentation.