-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
An interface for objects that expose type-safe getter methods. | ||
============================================================== | ||
|
||
Throughout PHP.Gt repositories, wherever an object represents enclosed data, a consistent interface is used to expose the data in a type-safe manner. | ||
|
||
The following methods are defined by this interface: | ||
|
||
+ `get(string $name):mixed` - A non-type-safe getter, used for getting keys that are not of an inbuilt type | ||
+ `getString(string $name):string` | ||
+ `getInt(string $name):int` | ||
+ `getFloat(string $name):float` | ||
+ `getBool(string $name):bool` | ||
+ `getDateTime(string $name):DateTimeInterface` | ||
|
||
Common areas you will see this interface used: | ||
|
||
+ Database rows | ||
+ User input (from the query string or posted form data) | ||
+ Session and cookie storage | ||
+ [DataObject](https://github.com/PhpGt/DataObject) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters