symphonycms /
symphony-2
| 1 | <?php |
||
| 2 | |||
| 3 | /** |
||
| 4 | * @package interface |
||
| 5 | */ |
||
| 6 | /** |
||
| 7 | * This interface is to be implemented by Extensions who wish to provide |
||
| 8 | * objects for Symphony to use. |
||
| 9 | * |
||
| 10 | * @since Symphony 2.3.1 |
||
| 11 | */ |
||
| 12 | interface iProvider |
||
|
0 ignored issues
–
show
|
|||
| 13 | { |
||
| 14 | const DATASOURCE = 'data-sources'; |
||
| 15 | const EVENT = 'events'; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @since Symphony 2.4 |
||
| 19 | */ |
||
| 20 | const CACHE = 'cache'; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @since Symphony 2.5.0 |
||
| 24 | */ |
||
| 25 | const ASSOCIATION_UI = 'association-ui'; |
||
| 26 | const ASSOCIATION_EDITOR = 'association-editor'; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * This function should return an associative array of all the |
||
| 30 | * Providable objects this extension provides. |
||
| 31 | * |
||
| 32 | * @since Symphony 2.3 |
||
| 33 | * @param string $type |
||
| 34 | * The type of provider object to return, which is one of the `iProvider` |
||
| 35 | * constants. If `$type` is given, this function should |
||
| 36 | * only return objects of this `$type`, otherwise all providable objects |
||
| 37 | * should be returned. |
||
| 38 | * @return array |
||
| 39 | * If no providers are found, then an empty array is returned, otherwise |
||
| 40 | * an associative array of classname => human name will be returned. |
||
| 41 | * eg. `array('RemoteDatasource' => 'Remote Datasource')` |
||
| 42 | */ |
||
| 43 | public static function providerOf($type = null); |
||
|
0 ignored issues
–
show
|
|||
| 44 | } |
||
| 45 |
Classes in PHP are usually named in CamelCase.
In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. The whole name starts with a capital letter as well.
Thus the name database provider becomes
DatabaseProvider.