Skip to content

Instantly share code, notes, and snippets.

@jeffturcotte
Last active December 10, 2015 23:49
Show Gist options
  • Save jeffturcotte/4512498 to your computer and use it in GitHub Desktop.
Save jeffturcotte/4512498 to your computer and use it in GitHub Desktop.
fActiveRecord Builder plugin example
<?php
$builder = new Builder('Page', array(
'name' => 'asc'
));
$builder->register('buildActive', function(&$where) {
$where['status='] = 'active';
});
$builder->extend('buildActive', 'buildActivePublished', function(&$where) {
$where['published='] = TRUE;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment