Menu

## Request extends Request
in package
Uses Microable

Request.php : 23

This method extends the Symfony request class to add more functionality to the request object.

All methods on the request object are still available in this class. But more methods have been added to the request object.

##### Tags

author

  Jet - ezrajet9@gmail.com

### Table of Contents

#### Properties

$auth : ContextUserObject|null
$authenticated : bool
$macros : array<string|int, mixed>
$app : PioniaApplication
$auth : ContextUserObject|null
$authenticated : bool

#### Methods

__call() : mixed
  Dynamically handle calls to the class.
__callStatic() : mixed
  Dynamically handle calls to the class.
flushMacros() : void
  Remove all the macros we had registered
getApplication() : PioniaApplication
getAuth() : ContextUserObject|null
  The currently logged user in context object
getData() : Arrayable
  Merges data sent from the client as json and form data as one array where one can access all the request data.
getFileByName() : FileBag|null
  Returns the file from the request if the request was submitted as form data
hasMacro() : bool
  Check if we have a method in the balonables
isAuthenticated() : bool
  This method checks if the request is authenticated
macro() : void
  Add a new mixable to the macros
mixin() : void
  Mix another object into the class.
setApplication() : void
setAuthenticationContext() : $this
  This method sets the authentication context for the request
setArrayContext() : $this
  This method add data to the context object

### Properties

#### $auth

Request.php : 0
`public ContextUserObject|null $auth`

The currently logged user in context object

#### $authenticated

Request.php : 0
`public bool $authenticated`

Whether the request is authenticated or not

#### $macros

Microable.php : 14
`protected static array<string|int, mixed> $macros = []`

#### $app

Request.php : 28
`private PioniaApplication $app`

#### $auth

Request.php : 32
`private ContextUserObject|null $auth = null`

#### $authenticated

Request.php : 30
`private bool $authenticated = false`

### Methods

#### __call()

Microable.php : 101

Dynamically handle calls to the class.

`public __call(string $method, array<string|int, mixed> $parameters) : mixed`

##### Parameters

$method : string
$parameters : array<string|int, mixed>

##### Tags

throws
  BadMethodCallException

#### __callStatic()

Microable.php : 75

Dynamically handle calls to the class.

`public static __callStatic(string $method, array<string|int, mixed> $parameters) : mixed`

##### Parameters

$method : string
$parameters : array<string|int, mixed>

##### Tags

throws
  BadMethodCallException

#### flushMacros()

Microable.php : 61

Remove all the macros we had registered

`public static flushMacros() : void`

#### getApplication()

Request.php : 132
`public getApplication() : PioniaApplication`

##### Return values

PioniaApplication

#### getAuth()

Request.php : 38

The currently logged user in context object

`public getAuth() : ContextUserObject|null`

##### Return values

ContextUserObject|null —

The currently logged in user object or null if no user is logged in

#### getData()

Request.php : 106

Merges data sent from the client as json and form data as one array where one can access all the request data.

`public getData() : Arrayable`

This implies that this request is safe for both json and form data scenarios

##### Return values

Arrayable

#### getFileByName()

Request.php : 119

Returns the file from the request if the request was submitted as form data

`public getFileByName( $fileName) : FileBag|null`

##### Parameters

$fileName :

##### Return values

FileBag|null

#### hasMacro()

Microable.php : 53

Check if we have a method in the balonables

`public static hasMacro(string $name) : bool`

##### Parameters

$name : string

##### Return values

bool

#### isAuthenticated()

Request.php : 47

This method checks if the request is authenticated

`public isAuthenticated() : bool`

##### Return values

bool —

Whether the request is authenticated or not

#### macro()

Microable.php : 22

Add a new mixable to the macros

`public static macro(string $key, $value) : void`

##### Parameters

$key : string
$value :

#### mixin()

Microable.php : 35

Mix another object into the class.

`public static mixin(object $mixin[, bool $replace = true ]) : void`

##### Parameters

$mixin : object
$replace : bool = true

##### Tags

throws
  ReflectionException

#### setApplication()

Request.php : 127
`public setApplication(PioniaApplication $application) : void`

##### Parameters

$application : PioniaApplication

#### setAuthenticationContext()

Request.php : 57

This method sets the authentication context for the request

`public setAuthenticationContext(ContextUserObject $userObject) : $this`

##### Parameters

$userObject : ContextUserObject

##### Return values

$this

#### setArrayContext()

Request.php : 72

This method add data to the context object

`private setArrayContext(array<string|int, mixed> $contextData) : $this`

##### Parameters

$contextData : array<string|int, mixed>

  The context data to be added to the request

##### Return values

$this

## Search results