| Recommend this page to a friend! |
| Info | Documentation | 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
| File | Role | Description | ||
|---|---|---|---|---|
| Data | Auxiliary data | |||
| Data | Auxiliary data | |||
| Class | Class source | |||
| Data | Auxiliary data | |||
| 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. |
| 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.