RedBeanPHP

easy ORM for PHP

Fuse Custom Method

FUSE does not only support hooks like update() and delete(). You can also call a non-existent method on a bean and it will fire the corresponding method on the model.



class Model_Dog extends RedBean_SimpleModel {
        public function 
bark() {
                echo 
'Whaf!';
        }
}

$dog R::dispense('dog');
$dog->bark(); //echos 'Whaf!'


Learn how you can write Models that automatically connect to be beans using FUSE.



User contributed notes. Please use the comment section to provide tips, notes and examples. To ask for support or to provide feedback use the forum. For bug reports use Github Issue Tracker.

Site comments powered by Disqus

page generated in 0.01056694984436 sec.