2017 © Pedro Peláez
 

library cinder

PHP ORM Layer

image

cinder/cinder

PHP ORM Layer

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Cinder

Cinder is a Mozilla Licensed PHP ORM Layer Written By Chareice., (*1)

Installing Cinder using Composer

  1. Add "cinder/cinder" as dependency in your project's composer.json file., (*2)

    {
        "require": {
            "cinder/cinder": "dev-master"
        }
    }
    
  2. Download and install Composer., (*3)

    curl -s "http://getcomposer.org/installer" | php, (*4)

  3. Install your dependencies., (*5)

    php composer.phar install, (*6)

  4. Require Composer's autoloader by adding the following line to your code's bootstrap process., (*7)

    require '/path/to/vendor/autoload.php';, (*8)

Usage

  1. At first, User must configure the connection to Database by using PDO Style:, (*9)

    <?php
    require "vendor/autoload.php";
    
    Cinder\Cinder::Config("mysql:host=localhost;dbname=app_test","root","pass");
    
  2. Then user can manipulate Cinder by offer it a $options variable like this:, (*10)

    $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"., (*11)

The Versions

26/07 2013

dev-master

9999999-dev http://github.com/chareice/cinder

PHP ORM Layer

  Sources   Download

Mozilla

The Requires

  • php >=5.3.0

 

orm