PHP Class PhpSpec\Laravel\Util\Laravel

Afficher le fichier Open project: benconstable/phpspec-laravel Class Usage Examples

Protected Properties

Свойство Type Description
$app Illuminate\Foundation\Application The Illuminate application instance.
$appPath string Path to the root of the Laravel application.
$env string The Laravel testing environment.

Méthodes publiques

Méthode Description
__construct ( string $env, string $appPath ) Constructor.
getAppPath ( ) : string Get the root Laravel application path.
getEnv ( ) : string Get the Laravel application environment being used.
refreshApplication ( Illuminate\Foundation\Application | null $app = null ) : void Refresh the application instance.

Méthodes protégées

Méthode Description
createApplication ( ) : Illuminate\Foundation\Application Creates a Laravel application.

Method Details

__construct() public méthode

Constructor.
public __construct ( string $env, string $appPath )
$env string Laravel testing environment. 'testing' by default
$appPath string Path to the Laravel bootstrap dir

createApplication() protected méthode

Creates a Laravel application.
protected createApplication ( ) : Illuminate\Foundation\Application
Résultat Illuminate\Foundation\Application

getAppPath() public méthode

Get the root Laravel application path.
public getAppPath ( ) : string
Résultat string Root laravel app path

getEnv() public méthode

Get the Laravel application environment being used.
public getEnv ( ) : string
Résultat string Environment name

refreshApplication() public méthode

Refresh the application instance.
public refreshApplication ( Illuminate\Foundation\Application | null $app = null ) : void
$app Illuminate\Foundation\Application | null Optionally provide your own unbooted Laravel Application instance. This parameter can largely be ignored and is used just for unit testing
Résultat void

Property Details

$app protected_oe property

The Illuminate application instance.
protected Application,Illuminate\Foundation $app
Résultat Illuminate\Foundation\Application

$appPath protected_oe property

Path to the root of the Laravel application.
protected string $appPath
Résultat string

$env protected_oe property

The Laravel testing environment.
protected string $env
Résultat string