Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

DataModel

PHP data access and serving class

If you just want to access the array of model data from the context of a container object, you should use either the attr method

    use Kosatyi\DataModel as Model;
    $model = new Model();
    $model->data([
        'prop' => 'value',
        'list' => [
            'item0','item1','item2'
        ],
        'map'  = [
            'prop1'=> 'value1',
            'prop2'=> 'value2' 
        ]
    ]);
    echo $model->attr('prop');
    echo $model->attr('list.0');
    echo $model->attr('map.prop1');
    $model->attr('list.1','item1-changed');
    $model->attr('prop','value-changed');
    $model->attr('map.prop2','value2');

About

PHP data access and serving class

Topics

Resources

Packages

No packages published