contributte / model
View-model and model tools for Nette Framework.
Fund package maintenance!
f3l1x
contributte.org/partners.html
Installs: 46 501
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 1
Open Issues: 0
Requires
- php: ^7.2
- nette/utils: ~3.0.1
Requires (Dev)
- ninjify/nunjuck: ^0.2.0
- ninjify/qa: ^0.8.0
- phpstan/extension-installer: ^1.0
- phpstan/phpstan-deprecation-rules: ^0.11
- phpstan/phpstan-nette: ^0.11
- phpstan/phpstan-shim: ^0.11
- phpstan/phpstan-strict-rules: ^0.11
Suggests
- ext-intl: Email domain normalization
This package is auto-updated.
Last update: 2021-06-25 18:07:35 UTC
README
Website 🚀 contributte.org | Contact 👨🏻💻 f3l1x.io | Twitter 🐦 @contributte
Disclaimer
Composer | contributte/model |
---|---|
Version | |
PHP | |
License |
Versions
State | Version | Branch | Nette | PHP |
---|---|---|---|---|
dev | ^0.3 |
master |
3.0+ | ^7.2 |
stable | ^0.2 |
master |
3.0+ | ^7.2 |
stable | ^0.1 |
master |
2.4 | >=7.1 |
Usage
Collections
LazyCollection
Initializes data only when required.
use Contributte\Model\ViewModel\Collections\LazyCollection; $items = LazyCollection::fromCallback(callback $datasource); foreach($items as $item) { // Datasource callback is called on first access }
Values
use Contributte\Model\Values\Email; $email = new Email('foo@example.com'); // Validate email format $value = $email->get(); // Get value $equal = $email->equal(new Email('foo@example.com')); // Compare values of objects
Development
This package was maintain by these authors.
Consider to support contributte development team. Also thank you for being used this package.