Request Library



( ZN >= 5.0.0 )

It is a library compiled from REQUEST data returned from $ _SERVER array .

 

# Methods


Mixed __call (Mixed  $ value = NULL )
String method ( String $ casing = 'upper' )
String scheme ( Void )
String uri ( Void )
Int time ( Void )
float timeFloat ( Void )

 

# __Call ( ZN >= 5.0.0 )


It is used to call the keys of the $ _REQUEST array with the method name. 

Parameters

Mixed $ value = NULL If it does not get the value, it returns the value of the method. If it takes a value, it changes the value of the method.
return Mixed

Use of

Request::body('Hello');

echo Request::body();
Hello

 

# Method ( ZN >= 4.3.5 )


Gives the method information of the request.

Parameters

String $ casing = 'upper' If it does not get the value, it returns the value of the method. If it takes a value, it changes the value of the method.
Options upper , lower , title
return String

Use of

echo Request::method();
echo Request::method('lower');
POST
post

 

# Scheme ( ZN >= 4.3.5 )


The request will return either http or https .

Parameters

void
return String

Use of

echo Request::scheme();
http

 

# Uri ( ZN >= 4.3.5 )


The request gives the URI information of the address it was made to.

Parameters

void
return String

Use of

URL: http: // localhost / example / home / test
echo Request::uri();
/ Example / home / test

 

# Time ( ZN >= 4.3.5 )


It gives you the time you want. This time is like the output of the time () method.

Parameters

void
return Int

Use of

echo Request::time();
1500709681 

 

# TimeFloat ( ZN >= 4.3.5 )


It gives you the time you want. This time is like the output of the time () method. The difference from the Request :: time () method is the float data type.

Parameters

void
return float

Use of

Request::timeFloat();
1500709751.863