1. Go to this page and download the library: Download monolyth/mural library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
$mural->rewrite('\\', 'Foo\\');
// Bar gets rewritten to Foo\Bar, but Bar\Baz is autoloaded verbatim.
class Bar extends Bar\Baz
{
}
// To rewrite Bar\Baz to Foo\Bar\Baz as well, you'd need an extra call to
// `rewrite` as follows:
$mural->rewrite('Bar', 'Foo\\Bar\\');
class SearchController
{
public function search()
{
if ($_SERVER['SERVER_NAME'] == 'straight.com') {
$search = new Straight\Search;
} else {
$search = new Gay\Search;
}
// ...
}
}
class SearchController
{
public function search()
{
$search = new Search;
// ...
}
}
$mural = new Monolyth\Mural\Autoloader;
$mural->rewrite('\\', 'Straight\\');
$mural = new Monolyth\Mural\Autoloader;
$mural->rewrite('\\', 'Straight\\`);
$mural = new Monolyth\Mural\Autoloader;
$mural->rewrite('\\', 'Gay\\');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.