Last active
January 31, 2018 11:52
-
-
Save Zegnat/062adb3e1f0ed935035f0e4fd4c36ecd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class KnownValetDriver extends BasicValetDriver | |
| { | |
| public function serves($sitePath, $siteName, $uri) | |
| { | |
| return is_file($sitePath . '/version.known'); | |
| } | |
| public function isStaticFile($sitePath, $siteName, $uri) | |
| { | |
| return parent::isStaticFile( | |
| $sitePath, | |
| $siteName, | |
| preg_replace('#^/(js|css)/[0-9]+/(.*)$#', '/\1/\2', $uri) | |
| ); | |
| } | |
| public function frontControllerPath($sitePath, $siteName, $uri) | |
| { | |
| $_SERVER['PHP_SELF'] = '/index.php'; | |
| return $sitePath . '/index.php'; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment