cinder / cinder
PHP ORM Layer
Installs: 11
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/cinder/cinder
Requires
- php: >=5.3.0
This package is auto-updated.
Last update: 2025-11-09 21:43:18 UTC
README
Cinder is a Mozilla Licensed PHP ORM Layer Written By Chareice.
Installing Cinder using Composer
-
Add
"cinder/cinder"as dependency in your project'scomposer.jsonfile.{ "require": { "cinder/cinder": "dev-master" } } -
Download and install Composer.
curl -s "http://getcomposer.org/installer" | php -
Install your dependencies.
php composer.phar install -
Require Composer's autoloader by adding the following line to your code's bootstrap process.
require '/path/to/vendor/autoload.php';
Usage
- At first, User must configure the connection to Database by using PDO Style:
<?php require "vendor/autoload.php"; Cinder\Cinder::Config("mysql:host=localhost;dbname=app_test","root","pass");
- Then user can manipulate Cinder by offer it a
$optionsvariable like this:
$options = array( "table" => "article", "primary" => "id", "field" => "title", "value" => "Hello Wrold" ); $article = Cinder\Cinder::getInstance($options);
Now $article variable is the ORM Object that mapping to your row in article table which title equals "Hello World".