Skip to content
/ Pipe Public

I was messing, dont use this. ORM for MySQL without the traditional Model

Notifications You must be signed in to change notification settings

rcrowe/Pipe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pipe

Pipe is a simple ORM for PHP that makes use of the ActiveRecord pattern. It was written for cases when you don't want to adhere to an MVC pattern with models, something that the current ORM solutions do not provide.

Pipe is built for MySQL.

Requirements

  • [mandatory] PHP version 5.3 (developed using 5.3.1)

Pipe makes use of PDO for querying the database.

Make sure you have the drivers available for MySQL.

Example

<?php

require 'Pipe.php';

Pipe::initialize('username:password@host/table');

//Select the `users` table
$users = Pipe::table('users');

//Select row `2` from `id` column
//Short hand for: $users->select('*')->where('id', 2)->get()
$users->get_by_id(2);

//Change first name to Rob
$users->first_name = 'Rob';

//Make the change
$users->save();

?>

Docs

Documentation is generated directly from the source code using PhpDocumentator.

To regenerate: rm -r docs && phpdoc -c phpdoc.ini

Unit Tests

Pipe uses SimpleTest for unit testing. Run php -f AllTests.php in the tests folder.

License

Copyright 2010, Robert Crowe hello@vivalacrowe.com

Licensed under The MIT License Redistributions of files must retain the above copyright notice.

About

I was messing, dont use this. ORM for MySQL without the traditional Model

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages