fusepump / base.php
Base class with magic methods and options set and get.
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 4 995
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 1
Open Issues: 0
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2024-01-29 10:55:17 UTC
README
Base class with magic methods and options set and get.
Installation
Add this to your composer.json
{
"require": {
"fusepump/base.php": "0.1.*"
}
}
Then run:
composer install
And finally add require 'vendor/autoload.php'
to your php file;
Example
class Foo extends \FusePump\Base\Base { public function __construct() { parent::__construct( // Fields array( 'user_id' => 'bob' ), // Options array( 'foo' => array( 'bar' => 'baz' ) ) ); } } $foo = new Foo(); $foo->getUserId(); // bob $foo->getOption('foo.bar'); // 'baz' $foo->setUserName('Bobinda'); // magic set method $foo->getFields(); // array( 'user_name' => 'Bobinda' );
License
MIT