mirror of
https://github.com/laravel/valet.git
synced 2026-02-07 09:10:03 +01:00
- Extract much of server.php into a `Server` class - Move all but the Laravel and Basic drivers into a subfolder - Load all but the Laravel and Basic drivers via glob - Add `beforeLoading` hook to simplify the `frontControllerPath` method for some drivers
35 lines
826 B
PHP
35 lines
826 B
PHP
<?php
|
|
|
|
namespace Valet\Drivers\Specific;
|
|
|
|
use Valet\Drivers\BasicValetDriver;
|
|
|
|
class JoomlaValetDriver extends BasicValetDriver
|
|
{
|
|
/**
|
|
* Determine if the driver serves the request.
|
|
*
|
|
* @param string $sitePath
|
|
* @param string $siteName
|
|
* @param string $uri
|
|
* @return bool
|
|
*/
|
|
public function serves(string $sitePath, string $siteName, string $uri): bool
|
|
{
|
|
return is_dir($sitePath.'/libraries/joomla');
|
|
}
|
|
|
|
/**
|
|
* Take any steps necessary before loading the front controller for this driver.
|
|
*
|
|
* @param string $sitePath
|
|
* @param string $siteName
|
|
* @param string $uri
|
|
* @return void
|
|
*/
|
|
public function beforeLoading(string $sitePath, string $siteName, string $uri): void
|
|
{
|
|
$_SERVER['PHP_SELF'] = $uri;
|
|
}
|
|
}
|