library attributes
A simple Attributes mechanism which makes setting attributes simple and more manageable.
vbpupil/attributes
A simple Attributes mechanism which makes setting attributes simple and more manageable.
- Monday, July 10, 2017
- by vbpupil
- Repository
- 1 Watchers
- 0 Stars
- 1 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 2 Versions
- 0 % Grown
Quality Assurance
, (*1)
Attributes
A simple Attributes mechanism that makes keeping track of settings a lot more manageable., (*2)
Sample Usage
include 'vendor/autoload.php';
use vbpupil\Attributes;
use vbpupil\Attribute;
//create individual attribute
$attr = new Attribute(['foo'=>'bar']);
$attr->getKey();
$attr->getValue();
//create a new bunch of attributes
try {
$attrs = new Attributes(
[
new Attribute(['product_code'=>'126FGE']),
new Attribute(['sell_price'=>3.80]),
new Attribute(['buy_price'=>1.90])
],
[
'product_code'
]
);
} catch (\Exception $e) {
}
$attrs->getAttribute('product_code');
$attrs->getAttribute('product_code')->getValue();
dev-master
9999999-dev
A simple Attributes mechanism which makes setting attributes simple and more manageable.
Sources
Download
MIT
The Development Requires
1.0
1.0.0.0
Attribute mechanism via associative arrays
Sources
Download
by
Dean Haines