mirror of
https://github.com/laravel/valet.git
synced 2026-02-08 01:10:08 +01:00
Update drivers location and loading
- 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
This commit is contained in:
34
cli/Valet/Drivers/Specific/JoomlaValetDriver.php
Normal file
34
cli/Valet/Drivers/Specific/JoomlaValetDriver.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user