/rx

A shorthand library for RedBeanPHP

Primary LanguagePHP

rx

A shorthand library for RedBeanPHP

CAUTION: Large parts of this are untested and I'm making stuff up as I go along

An Extended Facade

$type = R::_( 'type' ); // Dispense beans

$type = R::_( 'type', $id ); // Load beans

R::_( $bean ); // Store beans

Learn more about the Facade

A short, fluid helper for finding beans

/**
 * Search for a project
 */
$project = R::$x->project->name($name)->find();

/**
 * Actually, if you can't find one, make one with that data
 */
$project = R::$x->project->name($name)->find(true);

Learn more about the Find Helper