public function __construct(PluginInterface $plugin) { $this->plugin = $plugin; $this->metas = $plugin->getMetas(); if ($this->metas && false == is_array($this->metas)) { throw new \RuntimeException(sprintf('Invalid meta plugin at %s.', get_class($plugin))); } }