There was an error while loading. Please reload this page.
To slightly simplify the stub generating process, the Herrera\Box\StubGenerator class was created.
Herrera\Box\StubGenerator
StubGenerator alias(string $alias)
Sets the alias to be used in phar:// URLs.
phar://
This value is used with either Phar::mapPhar() or Phar::webPhar().
Phar::mapPhar()
Phar::webPhar()
StubGenerator create()
Creates a new instance of the stub generator.
<?php $generator = StubGenerator::create();
StubGenerator index(string $index)
Sets location within the Phar of index script.
require()
StubGenerator intercept(boolean $intercept)
Use the Phar::interceptFileFuncs() method in the stub?
Phar::interceptFileFuncs()
string generate()
Generates the stub.
StubGenerator mimetypes(array $mimetypes)
Sets the map for file extensions and their mimetypes.
This value is requires the use of Phar::webServer().
Phar::webServer()
StubGenerator mung(array $list)
Sets the list of server variables to modify.
This value is passed to Phar::mungServer().
Phar::mungServer()
StubGenerator notFound(string $script)
Sets the location of the script to run when a file is not found.
StubGenerator rewrite(string $function)
Sets the rewrite function name, since Closures cannot be converted to strings.
StubGenerator web(boolean $web)
Use Phar::webPhar() instead of Phar::mapPhar()?