Predefined Constants & Functions



In this section, functions that are defined in the system but can be utilized by users will also be included.

 

 

# Functions


String CSRFInput ( Void )
Mixed output ( Mixed $ data , Array $ settings = [] , Bool $ content = false )
void redirect ( String $ url , Int $ time = 0 , Array $ data = [] , Bool $ exit = true )

 

 

# CSRFInput ( ZN >= 4.3.2 )


Used to create a hidden input object to control and match that data when routing data is generated or CSRF token data is created with the Security class .

Parameters

void
return String

Use of

echo CSRFInput();

 

 

# Output ( ZN >= 2.0.0 )


Outputs that can be output or can not be output are used for output. Especially useful to see the output of the array type of data.

Parameters

Mixed $ data The string or array to be output.
return Mixed

Use of

output([1, 2, true, ['a' => 1, 'b']]);
0 => integer 1 (length = 1 ) ,
1 => integer 2 (length = 1 ) ,
2 => boolean true (length = 4 ) ,
3 => array
(
        a => integer 1 (length = 1 ) ,
        0 => string 'b' (length = 3 ) ,
)

 

 

# Redirect ( ZN >= 3.0.0 )


It is used to refresh the page after a certain period of time or to redirect to another page.

Parameters

String $ uri Where to lead.
Int $ time = 0 Standby time.
Array $ data = [] Data to be sent.
Bool $ exit = true Do you stop page code streaming?
return void

Use of

redirect('profile', 2);