Download the PHP package mouf/utils.value.value-interface without Composer
On this page you can find all versions of the php package mouf/utils.value.value-interface. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mouf/utils.value.value-interface
More information about mouf/utils.value.value-interface
Files in mouf/utils.value.value-interface
Package utils.value.value-interface
Short Description This package contains an interface used by many objects to say they represent a value that can be computed. The concept is very simple, and very powerful at the same time.
License MIT
Homepage https://mouf-php.com/mouf/utils.value.value-interface
Informations about the package utils.value.value-interface
What is this package
This package contains an interface used by many objects to declare they represent a unique value.
If your objects represent a single value, they should implement ValueInterface. An object implementing this interface will return a single value when the "val()" method is called. The value can be anything (if you want the value to be a string, a bool, an array or something else, use one of the subinterfaces provided, like StringValueInterface for instance).
This is a very simple and very powerful system.
Here are a few samples:
- a class that represents one GET or POST parameter
- a class that represents the result of a complex operation
- a class that represents a user bean
- a class that represents whether the current user has some right
- ...
This package does not only contains the ValueInterface interface. It also contains a number of more specialized interfaces that extend ValueInterface and that represent specific values (like a string or a bool).
Here is a list of all interfaces available in this package:
- ValueInterface
- ScalarValueInterface
- StringValueInterface
- BoolValueInterface
- NumberValueInterface
- IntValueInterface
- ObjectValueInterface
- ArrayValueInterface
- MapValueInterface
- ScalarValueInterface
Mouf package
This package is part of Mouf (http://mouf-php.com), an effort to ensure good developing practices by providing a graphical dependency injection framework.