| Recommend this page to a friend! | 
|  Download | 
| Info | Documentation |  Files |  Install with Composer |  Download | Reputation | Support forum | Blog | Links | 
| Ratings | Unique User Downloads | Download Rankings | ||||
| Not yet rated by the users | Total: 29 | All time:  11,180 This week: 206  | ||||
| Version | License | PHP version | Categories | |||
| mezon-fields-set 1.0 | MIT/X Consortium ... | 5 | PHP 5, Data types | 
| Description | Author | |
| This package can manipulate a set of field types and constraints. | 
You may need to store a list of typed fields for some purposes. So this class doing exactly what you need.
Just print
composer require mezon/fields-set
The creation is quite simple
$fieldsSet = new \Mezon\FieldsSet([
    'id' => [
        'type' => 'int',
        'title' => 'id of the record'
    ],
    'title' => [
        'type' => 'string',
        'title' => 'some title'
    ],
    'description' => [
        'type' => 'string',
        'title' => 'quite obvious yeah?)'
    ]
]);
Method returns all fields in the set
public function getFields(): array
Method validates if the field exists in our set
public function hasField(string $fieldName): bool
Method returns a list of fields'es names as array:
public function getFieldsNames(): array
|  Files (6) | 
| File | Role | Description | ||
|---|---|---|---|---|
|  Tests (1 file) | ||||
|    .travis.yml | Data | Auxiliary data | ||
|    composer.json | Data | Auxiliary data | ||
|  FieldsSet.php | Class | Class source | ||
|    phpunit.xml | Data | Auxiliary data | ||
|    README.md | Doc. | Documentation | ||
| The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. | 
|  Install with Composer | 
| Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
| 100% | 
 | 
 | 
| Applications that use this package | 
 If you know an application of this package, send a message to the author to add a link here.
 If you know an application of this package, send a message to the author to add a link here.