mirror of
https://github.com/laravel/valet.git
synced 2026-02-04 08:10:07 +01:00
Create JoomlaValetDriver.php
This commit is contained in:
32
cli/drivers/JoomlaValetDriver.php
Normal file
32
cli/drivers/JoomlaValetDriver.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
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($sitePath, $siteName, $uri)
|
||||
{
|
||||
return is_dir($sitePath.'/libraries/joomla') && is_dir($sitePath.'/build/phpcs/Joomla');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the fully resolved path to the application's front controller.
|
||||
*
|
||||
* @param string $sitePath
|
||||
* @param string $siteName
|
||||
* @param string $uri
|
||||
* @return string
|
||||
*/
|
||||
public function frontControllerPath($sitePath, $siteName, $uri)
|
||||
{
|
||||
$_SERVER['PHP_SELF'] = $uri;
|
||||
|
||||
return parent::frontControllerPath($sitePath, $siteName, $uri);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user