Documentation

Schema extends Facade
in package

Facade base class Adds the ability to define a fallback instance.

Tags
see
Builder

Table of Contents

$app  : Application
The application instance being facaded.
$resolvedInstance  : array<string|int, mixed>
The resolved object instances.
__callStatic()  : mixed
Handle dynamic, static calls to the object.
clearResolvedInstance()  : void
Clear a resolved facade instance.
clearResolvedInstances()  : void
Clear all of the resolved instances.
connection()  : Builder
Get a schema builder instance for a connection.
create()  :
defaultStringLength()  :
disableForeignKeyConstraints()  :
drop()  :
dropIfExists()  :
enableForeignKeyConstraints()  :
getFacadeApplication()  : Application
Get the application instance behind the facade.
getFacadeRoot()  : mixed
Get the root object behind the facade.
hasColumn()  :
hasColumns()  :
hasTable()  :
registerCustomDoctrineType()  :
rename()  :
setFacadeApplication()  : void
Set the application instance.
shouldReceive()  : Expectation
Initiate a mock expectation on the facade.
spy()  : void
Convert the facade into a Mockery spy.
swap()  : void
Hotswap the underlying instance behind the facade.
table()  :
createFreshMockInstance()  : Expectation
Create a fresh mock instance for the given class.
createMock()  : MockInterface
Create a fresh mock instance for the given class.
getFacadeAccessor()  : Builder
Get a schema builder instance for the default connection.
getFacadeInstance()  : mixed
If the accessor is not found via getFacadeAccessor, use this instance as a fallback.
getMockableClass()  : string|null
Get the mockable class for the bound instance.
isMock()  : bool
Determines whether a mock is set as the instance of the facade.
resolveFacadeInstance()  : mixed
Resolve the facade root instance from the container.

Properties

$resolvedInstance

The resolved object instances.

protected static array<string|int, mixed> $resolvedInstance

Methods

__callStatic()

Handle dynamic, static calls to the object.

public static __callStatic(string $method, array<string|int, mixed> $args) : mixed
Parameters
$method : string
$args : array<string|int, mixed>
Tags
throws
RuntimeException
Return values
mixed

clearResolvedInstance()

Clear a resolved facade instance.

public static clearResolvedInstance(string $name) : void
Parameters
$name : string
Return values
void

clearResolvedInstances()

Clear all of the resolved instances.

public static clearResolvedInstances() : void
Return values
void

connection()

Get a schema builder instance for a connection.

public static connection(string $name) : Builder
Parameters
$name : string
Return values
Builder

create()

public static create(string $table, Closure $callback) :
Parameters
$table : string
$callback : Closure
Return values

defaultStringLength()

public static defaultStringLength(int $length) :
Parameters
$length : int
Return values

disableForeignKeyConstraints()

public static disableForeignKeyConstraints() :
Return values

drop()

public static drop(string $table) :
Parameters
$table : string
Return values

dropIfExists()

public static dropIfExists(string $table) :
Parameters
$table : string
Return values

enableForeignKeyConstraints()

public static enableForeignKeyConstraints() :
Return values

getFacadeApplication()

Get the application instance behind the facade.

public static getFacadeApplication() : Application
Return values
Application

getFacadeRoot()

Get the root object behind the facade.

public static getFacadeRoot() : mixed
Return values
mixed

hasColumn()

public static hasColumn(string $table, string $column) :
Parameters
$table : string
$column : string
Return values

hasColumns()

public static hasColumns(string $table, array<string|int, mixed> $columns) :
Parameters
$table : string
$columns : array<string|int, mixed>
Return values

hasTable()

public static hasTable(string $table) :
Parameters
$table : string
Return values

registerCustomDoctrineType()

public static registerCustomDoctrineType(string $class, string $name, string $type) :
Parameters
$class : string
$name : string
$type : string
Return values

rename()

public static rename(string $from, string $to) :
Parameters
$from : string
$to : string
Return values

setFacadeApplication()

Set the application instance.

public static setFacadeApplication(Application $app) : void
Parameters
$app : Application
Return values
void

shouldReceive()

Initiate a mock expectation on the facade.

public static shouldReceive() : Expectation
Return values
Expectation

spy()

Convert the facade into a Mockery spy.

public static spy() : void
Return values
void

swap()

Hotswap the underlying instance behind the facade.

public static swap(mixed $instance) : void
Parameters
$instance : mixed
Return values
void

table()

public static table(string $table, Closure $callback) :
Parameters
$table : string
$callback : Closure
Return values

createFreshMockInstance()

Create a fresh mock instance for the given class.

protected static createFreshMockInstance() : Expectation
Return values
Expectation

createMock()

Create a fresh mock instance for the given class.

protected static createMock() : MockInterface
Return values
MockInterface

getFacadeAccessor()

Get a schema builder instance for the default connection.

protected static getFacadeAccessor() : Builder
Return values
Builder

getFacadeInstance()

If the accessor is not found via getFacadeAccessor, use this instance as a fallback.

protected static getFacadeInstance() : mixed
Return values
mixed

getMockableClass()

Get the mockable class for the bound instance.

protected static getMockableClass() : string|null
Return values
string|null

isMock()

Determines whether a mock is set as the instance of the facade.

protected static isMock() : bool
Return values
bool

resolveFacadeInstance()

Resolve the facade root instance from the container.

protected static resolveFacadeInstance(string|object $name) : mixed
Parameters
$name : string|object
Return values
mixed

Search results