1
0
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:
Christophor Wilson
2016-05-10 09:51:44 -06:00
parent 97f7ae2342
commit ae95858e28

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