Skip to content
Snippets Groups Projects

Draft: Basic implementation of plugin initializer

Closed Bartek Jaskulski requested to merge 1.x into review
2 unresolved threads
1 file
+ 5
1
Compare changes
  • Side-by-side
  • Inline
@@ -75,7 +75,7 @@ final class PluginInit {
$this->filename = $backtrace[0]['file'];
}
$cache_path = $this->config->get( 'cache_path', 'generated' ) . '/plugin.php';
$cache_path = $this->get_cache_dir() . '/plugin.php';
try {
$plugin_data = $this->loader->load( $cache_path );
} catch ( \Exception $e ) {
@@ -95,6 +95,10 @@ final class PluginInit {
return $plugin;
}
private function get_cache_dir(): string {
return $this->filename . '/' . $this->config->get( 'cache_path', 'generated' );
}
private function initialize_container( Plugin $plugin ): Container {
$original_builder = new DiBuilder();
$builder = new ContainerBuilder( $original_builder );
Loading