1 | <?php |
||
15 | class Movie_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) { |
||
60 | |||
61 | /** |
||
62 | * Get plugin's priority |
||
63 | * @return int |
||
64 | */ |
||
65 | function getPriority() { |
||
68 | |||
69 | /** |
||
70 | * Is it the right plugin for the command? |
||
71 | * @param string $command |
||
72 | * @return boolean |
||
73 | */ |
||
74 | function isLikely($command) { |
||
77 | |||
78 | /** |
||
79 | * Does the plugin need a session? |
||
80 | * @return boolean |
||
81 | */ |
||
82 | function hasSession() { |
||
85 | } |
||
86 |
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.