src/Filesystem.php 1 location
|
@@ 49-60 (lines=12) @@
|
| 46 |
|
* |
| 47 |
|
* @return PluginInterface $plugin |
| 48 |
|
*/ |
| 49 |
|
protected function findPlugin($method) |
| 50 |
|
{ |
| 51 |
|
if ( ! isset($this->plugins[$method])) { |
| 52 |
|
throw new PluginNotFoundException('Plugin not found for method: ' . $method); |
| 53 |
|
} |
| 54 |
|
|
| 55 |
|
if ( ! method_exists($this->plugins[$method], 'handle')) { |
| 56 |
|
throw new LogicException(get_class($this->plugins[$method]) . ' does not have a handle method.'); |
| 57 |
|
} |
| 58 |
|
|
| 59 |
|
return $this->plugins[$method]; |
| 60 |
|
} |
| 61 |
|
|
| 62 |
|
/** |
| 63 |
|
* Invoke a plugin by method name. |
src/MountManager.php 1 location
|
@@ 78-89 (lines=12) @@
|
| 75 |
|
* |
| 76 |
|
* @return PluginInterface $plugin |
| 77 |
|
*/ |
| 78 |
|
protected function findPlugin($method) |
| 79 |
|
{ |
| 80 |
|
if ( ! isset($this->plugins[$method])) { |
| 81 |
|
throw new PluginNotFoundException('Plugin not found for method: ' . $method); |
| 82 |
|
} |
| 83 |
|
|
| 84 |
|
if ( ! method_exists($this->plugins[$method], 'handle')) { |
| 85 |
|
throw new LogicException(get_class($this->plugins[$method]) . ' does not have a handle method.'); |
| 86 |
|
} |
| 87 |
|
|
| 88 |
|
return $this->plugins[$method]; |
| 89 |
|
} |
| 90 |
|
|
| 91 |
|
/** |
| 92 |
|
* Invoke a plugin by method name. |
src/Plugin/PluggableTrait.php 1 location
|
@@ 40-51 (lines=12) @@
|
| 37 |
|
* |
| 38 |
|
* @return PluginInterface $plugin |
| 39 |
|
*/ |
| 40 |
|
protected function findPlugin($method) |
| 41 |
|
{ |
| 42 |
|
if ( ! isset($this->plugins[$method])) { |
| 43 |
|
throw new PluginNotFoundException('Plugin not found for method: ' . $method); |
| 44 |
|
} |
| 45 |
|
|
| 46 |
|
if ( ! method_exists($this->plugins[$method], 'handle')) { |
| 47 |
|
throw new LogicException(get_class($this->plugins[$method]) . ' does not have a handle method.'); |
| 48 |
|
} |
| 49 |
|
|
| 50 |
|
return $this->plugins[$method]; |
| 51 |
|
} |
| 52 |
|
|
| 53 |
|
/** |
| 54 |
|
* Invoke a plugin by method name. |