1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-06 16:50:09 +01:00

Add Sculpin Valet driver

This commit is contained in:
Jason Walton
2016-05-06 12:17:30 -07:00
parent 626e8210df
commit 8b20e11c6c
2 changed files with 29 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
<?php
class SculpinValetDriver extends StaticValetDriver
{
/**
* Determine if the driver serves the request.
*
* @param string $sitePath
* @param string $siteName
* @param string $uri
* @return void
*/
public function serves($sitePath, $siteName, $uri)
{
return is_dir($sitePath.'/.sculpin');
}
/**
* Mutate the incoming URI.
*
* @param string $uri
* @return string
*/
public function mutateUri($uri)
{
return rtrim('/output_dev'.$uri, '/');
}
}

View File

@@ -9,3 +9,4 @@
require_once __DIR__.'/CraftValetDriver.php';
require_once __DIR__.'/SymfonyValetDriver.php';
require_once __DIR__.'/GenericPhpValetDriver.php';
require_once __DIR__.'/SculpinValetDriver.php';