Use this method with your IDE to help manually build a Plugin with PHP
@param string $name
@return \LCI\Blend\Blendable\Plugin
970321
public function getBlendablePlugin($name)
    {
        /** @var \LCI\Blend\Blendable\Plugin $plugin */
        $plugin = new Plugin($this->modx, $this->blender, $name);
        return $plugin->setSeedsDir($this->blender->getSeedsDir());
    }
717022
public static function get($name)
    {
        $blueprints = new Blueprints('plugins://');
        $blueprint = $blueprints->get("{$name}/blueprints");

        // Load default configuration.
        $file = CompiledYamlFile::instance("plugins://{$name}/{$name}" . YAML_EXT);

        // ensure this is a valid plugin
        if (!$file->exists()) {
            return null;
        }

        $obj = new Data((array)$file->content(), $blueprint);

        // Override with user configuration.
        $obj->merge(Grav::instance()['config']->get('plugins.' . $name) ?: []);

        // Save configuration always to user/config.
        $file = CompiledYamlFile::instance("config://plugins/{$name}.yaml");
        $obj->file($file);

        return $obj;
    }
962266
public function load($name)
    {
        $helper = $this->getRegisteredHelper($name);

        $reflection = new \ReflectionClass($helper);
        $class = $reflection->newInstance($this->di);

        return $class;
    }
363734
public function getBlendableTemplateVariable($name)
    {
        /** @var \LCI\Blend\Blendable\TemplateVariable $tv */
        $tv = new TemplateVariable($this->modx, $this->blender, $name);
        return $tv->setSeedsDir($this->blender->getSeedsDir());
    }
683638
public function create($name)
    {
        $this->checkName($name);

        $configuration = new Configuration();

        $configuration->setName($name);

        $configuration->setModel($this->getParameter($name, 'model'));
        $configuration->setForm($this->getParameter($name, 'form'));
        $configuration->setFormTemplate($this->getParameter($name, 'template.form'));
        $configuration->setRecipientTemplate($this->getParameter($name, 'template.recipient'));
        $configuration->setRecipient($this->getParameter($name, 'recipient'));
        $configuration->setConfirmTemplate($this->getParameter($name, 'template.confirm'));
        $configuration->setPageTemplate($this->getParameter($name, 'template.page'));
        $configuration->setFrom($this->getParameter($name, 'from'));
        $configuration->setSenderName($this->getParameter($name, 'sender_name'));
        $configuration->setSubject($this->getParameter($name, 'subject'));
        $configuration->setTranslationDomain($this->getParameter($name, 'translation_domain'));
        $configuration->setConfirmMail($this->getParameter($name, 'confirm_mail'));

        return $configuration;
    }
350937
public static function getPlugin(string $name)
    {
        if (isset(self::$plugins[$name])) {
            return self::$plugins[$name];
        }
        $class = '\\sdopx\\plugin\\' . Utils::toCamel($name) . 'Plugin';
        if (class_exists($class)) {
            self::$plugins[$name] = new $class();
            return self::$plugins[$name];
        }
        return null;
    }
1146961
public function plugin(string $name, array $options = []): PluginInterface
    {
        return $this->getPluginManager()->get($name, $options);
    }
423736
public function getBlendableChunk($name)
    {
        /** @var \LCI\Blend\Blendable\Chunk $chunk */
        $chunk = new Chunk($this->modx, $this->blender, $name);
        return $chunk->setSeedsDir($this->blender->getSeedsDir());
    }
786716
protected function createElement($name)
    {
        if (isset($this->elements[$name])) {
            return $this->factory->createInlineElement($this->elements[$name]);
        }

        return $this->factory->createElement($name);
    }
898953
public function getOptionsPlugin($name = '') {
		if ($name) {
			return isset($this->options['plugin'][$name])? $this->options['plugin'][$name] : array();
		} else {
			return $this->options['plugin'];
		}
	}
1054016
protected function buildClass($name)
    {
        $stub = file_get_contents($this->getStub());

        return $this->replaceNamespace($stub, $name)->replaceClass($stub, $name);
    }
437268
protected function buildClass($name)
    {
        $stub = $this->files->get($this->getStub());

        return $this->replaceClassAndNamespace($name, $stub)->replaceFields($name, $stub);
    }
530125
private function build(string $name)
    {
        $instance = null;
        $map = $this->map[$name];

        if (is_array($map)) {
            $params = $this->getParamsFromMap($map);
            $instance = new $name(...$params);
        } elseif ($map instanceof \Closure) {
            $instance = $map($this);
        } elseif (is_object($map)) {
            $instance = $map;
        } elseif (is_string($map)) {
            $instance = $this->get($map);
        } else {
            throw new \Exception('Invalid map');
        }

        return $instance;
    }
764497
private function factory($name)
    {
        $factory = FabricateFactory::create(self::getInstance()->registry->find($name));
        $factory->setConfig(self::getInstance()->config);
        return $factory;
    }
1193560
public function get(string $name = null): \TheCMSThread\Classes\Plugin
    {
        if (empty($name) === false && empty($this->plugins[$name]) === false) {
            return $this->plugins[$name];
        } else {
            throw new \InvalidArgumentException("Plugin not found");
        }
    }
73043
protected function instance($name)
    {
        $methodName = $this->methodName($name);

        return $this->objectBuild($name, $methodName);
    }
379685
protected function createFluentDriver(string $name): ProviderContract
    {
        $config = $this->config['fluent'][$name] ?? [];
        $cache = $this->getCacheRepository($config);

        return $this->createProvider(new Fluent($name, $config, $this->app->make('db'), $cache));
    }