1
0
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:
Taylor Otwell
2016-05-12 16:11:50 -05:00
3 changed files with 34 additions and 0 deletions

View 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);
}
}

View File

@@ -58,6 +58,7 @@ public static function assign($sitePath, $siteName, $uri)
$drivers[] = 'KirbyValetDriver';
$drivers[] = 'ContaoValetDriver';
$drivers[] = 'KatanaValetDriver';
$drivers[] = 'JoomlaValetDriver';
$drivers[] = 'BasicValetDriver';

View File

@@ -22,3 +22,4 @@
require_once __DIR__.'/ContaoValetDriver.php';
require_once __DIR__.'/KatanaValetDriver.php';
require_once __DIR__.'/CakeValetDriver.php';
require_once __DIR__.'/JoomlaValetDriver.php';