PHP Class Valet\Site

Exibir arquivo Open project: laravel/valet

Public Properties

Property Type Description
$cli
$config
$files

Public Methods

Method Description
__construct ( Configuration $config, CommandLine $cli, Filesystem $files ) Create a new Site instance.
buildSecureCaddyfile ( string $url ) : string Build the TLS secured Caddyfile for the given URL.
certificatesPath ( ) : string Get the path to the Valet TLS certificates.
createCertificate ( string $url ) : void Create and trust a certificate for the given URL.
createPrivateKey ( string $keyPath ) : void Create the private key for the TLS certificate.
createSigningRequest ( $url, string $keyPath, $csrPath ) : void Create the signing request for the TLS certificate.
host ( string $path ) : string | null Get the real hostname for the given path, checking links.
link ( string $target, string $link ) : string Link the current working directory with the given name.
pruneLinks ( ) : void Remove all broken symbolic links.
resecureForNewDomain ( string $oldDomain, string $domain ) : void Resecure all currently secured sites with a fresh domain.
secure ( string $url ) : void Secure the given host with TLS.
secured ( ) : array Get all of the URLs that are currently secured.
sitesPath ( ) : string Get the path to the linked Valet sites.
trustCertificate ( string $crtPath ) : void Trust the given certificate file in the Mac Keychain.
unlink ( string $name ) : void Unlink the given symbolic link.
unsecure ( string $url ) : void Unsecure the given URL so that it will use HTTP again.

Method Details

__construct() public method

Create a new Site instance.
public __construct ( Configuration $config, CommandLine $cli, Filesystem $files )
$config Configuration
$cli CommandLine
$files Filesystem

buildSecureCaddyfile() public method

Build the TLS secured Caddyfile for the given URL.
public buildSecureCaddyfile ( string $url ) : string
$url string
return string

certificatesPath() public method

Get the path to the Valet TLS certificates.
public certificatesPath ( ) : string
return string

createCertificate() public method

Create and trust a certificate for the given URL.
public createCertificate ( string $url ) : void
$url string
return void

createPrivateKey() public method

Create the private key for the TLS certificate.
public createPrivateKey ( string $keyPath ) : void
$keyPath string
return void

createSigningRequest() public method

Create the signing request for the TLS certificate.
public createSigningRequest ( $url, string $keyPath, $csrPath ) : void
$keyPath string
return void

host() public method

Get the real hostname for the given path, checking links.
public host ( string $path ) : string | null
$path string
return string | null

resecureForNewDomain() public method

Resecure all currently secured sites with a fresh domain.
public resecureForNewDomain ( string $oldDomain, string $domain ) : void
$oldDomain string
$domain string
return void

secure() public method

Secure the given host with TLS.
public secure ( string $url ) : void
$url string
return void

secured() public method

Get all of the URLs that are currently secured.
public secured ( ) : array
return array

sitesPath() public method

Get the path to the linked Valet sites.
public sitesPath ( ) : string
return string

trustCertificate() public method

Trust the given certificate file in the Mac Keychain.
public trustCertificate ( string $crtPath ) : void
$crtPath string
return void

unsecure() public method

Unsecure the given URL so that it will use HTTP again.
public unsecure ( string $url ) : void
$url string
return void

Property Details

$cli public_oe property

public $cli

$config public_oe property

public $config

$files public_oe property

public $files