mirror of
https://github.com/laravel/valet.git
synced 2026-02-05 08:30:07 +01:00
Merge branch 'master' of https://github.com/CSWilson/valet into CSWilson-master
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);
|
||||
}
|
||||
}
|
||||
@@ -58,6 +58,7 @@ public static function assign($sitePath, $siteName, $uri)
|
||||
$drivers[] = 'KirbyValetDriver';
|
||||
$drivers[] = 'ContaoValetDriver';
|
||||
$drivers[] = 'KatanaValetDriver';
|
||||
$drivers[] = 'JoomlaValetDriver';
|
||||
|
||||
$drivers[] = 'BasicValetDriver';
|
||||
|
||||
|
||||
@@ -22,3 +22,4 @@
|
||||
require_once __DIR__.'/ContaoValetDriver.php';
|
||||
require_once __DIR__.'/KatanaValetDriver.php';
|
||||
require_once __DIR__.'/CakeValetDriver.php';
|
||||
require_once __DIR__.'/JoomlaValetDriver.php';
|
||||
|
||||
Reference in New Issue
Block a user