PHP Class ValetDriver

ファイルを表示 Open project: laravel/valet Class Usage Examples

Public Methods

Method Description
assign ( string $sitePath, string $siteName, string $uri ) : ValetDriver | null Find a driver that can serve the incoming request.
driversIn ( string $path ) : array Get all of the driver classes in a given path.
frontControllerPath ( string $sitePath, string $siteName, string $uri ) : string Get the fully resolved path to the application's front controller.
isStaticFile ( string $sitePath, string $siteName, string $uri ) : string | false Determine if the incoming request is for a static file.
mutateUri ( string $uri ) : string Mutate the incoming URI.
serveStaticFile ( string $staticFilePath, string $sitePath, string $siteName, string $uri ) : void Serve the static file at the given path.
serves ( string $sitePath, string $siteName, string $uri ) : boolean Determine if the driver serves the request.

Protected Methods

Method Description
isActualFile ( string $path ) : boolean Determine if the path is a file and not a directory.

Method Details

assign() public static method

Find a driver that can serve the incoming request.
public static assign ( string $sitePath, string $siteName, string $uri ) : ValetDriver | null
$sitePath string
$siteName string
$uri string
return ValetDriver | null

driversIn() public static method

Get all of the driver classes in a given path.
public static driversIn ( string $path ) : array
$path string
return array

frontControllerPath() abstract public method

Get the fully resolved path to the application's front controller.
abstract public frontControllerPath ( string $sitePath, string $siteName, string $uri ) : string
$sitePath string
$siteName string
$uri string
return string

isActualFile() protected method

Determine if the path is a file and not a directory.
protected isActualFile ( string $path ) : boolean
$path string
return boolean

isStaticFile() abstract public method

Determine if the incoming request is for a static file.
abstract public isStaticFile ( string $sitePath, string $siteName, string $uri ) : string | false
$sitePath string
$siteName string
$uri string
return string | false

mutateUri() public method

Mutate the incoming URI.
public mutateUri ( string $uri ) : string
$uri string
return string

serveStaticFile() public method

Serve the static file at the given path.
public serveStaticFile ( string $staticFilePath, string $sitePath, string $siteName, string $uri ) : void
$staticFilePath string
$sitePath string
$siteName string
$uri string
return void

serves() abstract public method

Determine if the driver serves the request.
abstract public serves ( string $sitePath, string $siteName, string $uri ) : boolean
$sitePath string
$siteName string
$uri string
return boolean