1 | <?php |
||
15 | class Hello_plugin implements \JarvisPHP\Core\JarvisPluginInterface{ |
||
16 | /** |
||
17 | * Priority of plugin |
||
18 | * @var int |
||
19 | */ |
||
20 | var $priority = 2; |
||
|
|||
21 | |||
22 | /** |
||
23 | * the behaviour of plugin |
||
24 | * @param string $command |
||
25 | */ |
||
26 | function answer($command) { |
||
47 | |||
48 | /** |
||
49 | * Get plugin's priority |
||
50 | * @return int |
||
51 | */ |
||
52 | function getPriority() { |
||
55 | |||
56 | /** |
||
57 | * Is it the right plugin for the command? |
||
58 | * @param string $command |
||
59 | * @return boolean |
||
60 | */ |
||
61 | function isLikely($command) { |
||
64 | |||
65 | /** |
||
66 | * Does the plugin need a session? |
||
67 | * @return boolean |
||
68 | */ |
||
69 | function hasSession() { |
||
72 | } |
||
73 |
The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using
the property is implicitly global.
To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.