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
+ 7
2
Compare changes
  • Side-by-side
  • Inline
@@ -13,8 +13,13 @@ class PhpFileLoader {
public function load( string $resource ) {
// TODO: add file locator
return ( static function () use ( $resource ) {
return include $resource;
$data = include $resource;
if ( $data === false ) {
throw new \RuntimeException( "Could not load $resource" );
}
return $data;
} )();
}
}
\ No newline at end of file
}
Loading