예제 #1
0
파일: Plugin.php 프로젝트: xphere/elcodi
 /**
  * Merge this plugin instance with a new one, and saves the result in
  * this instance.
  *
  * This method will give priority to its own properties values.
  *
  * @param Plugin $newPlugin New plugin configuration
  *
  * @return $this Self object
  */
 public function merge(Plugin $newPlugin)
 {
     if ($newPlugin->getNamespace() !== $this->getNamespace()) {
         throw new RuntimeException('Both plugins cannot be merged');
     }
     $this->configuration->merge($newPlugin->getConfiguration());
     return $this;
 }
예제 #2
0
 /**
  * @return PluginNotFoundException
  */
 public static function createPluginRouteNotFound(Plugin $plugin)
 {
     $message = sprintf('Elcodi cannot find plugin %s. Make sure it exists as a vendor by checking your composer, or load elcodi:install command in order to update the plugin database', $plugin->getNamespace());
     return new static($message);
 }