class
Session extends Facade (View source)
Properties
static protected Application|null
|
$app |
The application instance being facaded. |
from
Facade |
static protected array
|
$resolvedInstance |
The resolved object instances. |
from
Facade |
static protected bool
|
$cached |
Indicates if the resolved instance should be cached. |
from
Facade |
Methods
static void
resolved(
Closure $callback)
Run a Closure when the facade has been resolved.
spy()
Convert the facade into a Mockery spy.
expects()
Initiate a mock expectation on the facade.
createMock()
Create a fresh mock instance for the given class.
static bool
isMock()
Determines whether a mock is set as the instance of the facade.
static void
swap(mixed $instance)
Hotswap the underlying instance behind the facade.
static bool
isFake()
Determines whether a "fake" has been set as the facade instance.
static mixed
__callStatic(string $method, array $args)
Handle dynamic, static calls to the object.
static mixed
driver(string|null $driver = null)
No description
static array
only(array $keys)
No description
static array
except(array $keys)
No description
static bool
exists(string|array $key)
No description
static bool
missing(string|array $key)
No description
static bool
has(string|array $key)
No description
static bool
hasAny(string|array $key)
No description
static mixed
get(string $key, mixed $default = null)
No description
static mixed
pull(string $key, mixed $default = null)
No description
static mixed
getOldInput(string|null $key = null, mixed $default = null)
No description
static void
replace(array $attributes)
No description
static void
put(string|array $key, mixed $value = null)
No description
static void
push(string $key, mixed $value)
No description
static mixed
increment(string $key, int $amount = 1)
No description
static int
decrement(string $key, int $amount = 1)
No description
static void
flash(string $key, mixed $value = true)
No description
static void
now(string $key, mixed $value)
No description
static void
keep(array|mixed $keys = null)
No description
static mixed
remove(string $key)
No description
static void
forget(string|array $keys)
No description
static bool
migrate(bool $destroy = false)
No description
static void
setName(string $name)
No description
static void
setId(string|null $id)
No description
static void
macro(string $name, object|callable $macro)
No description
static void
mixin(object $mixin, bool $replace = true)
No description
Details
Run a Closure when the facade has been resolved.
Convert the facade into a Mockery spy.
static MockInterface
partialMock()
Initiate a partial mock on the facade.
static Expectation
shouldReceive()
Initiate a mock expectation on the facade.
Initiate a mock expectation on the facade.
static protected MockInterface
createFreshMockInstance()
Create a fresh mock instance for the given class.
static protected MockInterface
createMock()
Create a fresh mock instance for the given class.
static protected bool
isMock()
Determines whether a mock is set as the instance of the facade.
static protected string|null
getMockableClass()
Get the mockable class for the bound instance.
static void
swap(mixed $instance)
Hotswap the underlying instance behind the facade.
Determines whether a "fake" has been set as the facade instance.
Get the root object behind the facade.
static protected string
getFacadeAccessor()
Get the registered name of the component.
static protected mixed
resolveFacadeInstance(string $name)
Resolve the facade root instance from the container.
static void
clearResolvedInstance(string $name)
Clear a resolved facade instance.
static void
clearResolvedInstances()
Clear all of the resolved instances.
Get the application default aliases.
Get the application instance behind the facade.
Set the application instance.
static mixed
__callStatic(string $method, array $args)
Handle dynamic, static calls to the object.
static bool
shouldBlock()
static string|null
blockDriver()
static int
defaultRouteBlockLockSeconds()
static int
defaultRouteBlockWaitSeconds()
static array
getSessionConfig()
static string
getDefaultDriver()
static void
setDefaultDriver(string $name)
static mixed
driver(string|null $driver = null)
static array
getDrivers()
static void
ageFlashData()
static array
only(array $keys)
static array
except(array $keys)
static bool
exists(string|array $key)
static bool
missing(string|array $key)
static bool
has(string|array $key)
static bool
hasAny(string|array $key)
static mixed
get(string $key, mixed $default = null)
static mixed
pull(string $key, mixed $default = null)
static void
replace(array $attributes)
static void
put(string|array $key, mixed $value = null)
static mixed
remember(string $key, Closure $callback)
static void
push(string $key, mixed $value)
static mixed
increment(string $key, int $amount = 1)
static int
decrement(string $key, int $amount = 1)
static void
flash(string $key, mixed $value = true)
static void
now(string $key, mixed $value)
static void
keep(array|mixed $keys = null)
static mixed
remove(string $key)
static void
forget(string|array $keys)
static bool
regenerate(bool $destroy = false)
static bool
migrate(bool $destroy = false)
static void
setName(string $name)
static void
setId(string|null $id)
static bool
isValidId(string|null $id)
static void
setExists(bool $value)
static void
regenerateToken()
static bool
hasPreviousUri()
static string|null
previousUrl()
static void
setPreviousUrl(string $url)
static void
passwordConfirmed()
static bool
handlerNeedsRequest()
static void
setRequestOnHandler(Request $request)
static void
macro(string $name, object|callable $macro)
static void
mixin(object $mixin, bool $replace = true)
static bool
hasMacro(string $name)
static void
flushMacros()