heart.php
This is heart of IRON Library ( helper functions )
Table of Contents
- hr() : string
- Drop a horizontal line
- br() : void
- Drop a break line
- d() : void
- Drop a varible for showing value
- dd() : void
- Drop and die a variable for showing value
- js() : void
- Add javaScript code to HTML page
- redirect() : void
- Change URL path with PHP
- is_post() : bool
- Check request method is POST?
- is_get() : bool
- Check request method is GET?
- session() : void
- Return session value if set
- e_session() : void
- echo session value if set
- randomatic() : bool
- Creare a random string with your pattern and length
- check_cookie() : bool
- Chck cookie on ro off ?
- cookie() : void
- Return Cookie value if it's set
- my_address() : string
- Get url
- error() : void
- set error session
Functions
hr()
Drop a horizontal line
hr() : string
Tags
Return values
string —br()
Drop a break line
br() : void
Tags
Return values
void —d()
Drop a varible for showing value
d([ $data = "d function stop" ][, int|null $line_number = null ][, int|null $file_name = null ]) : void
Parameters
Tags
Return values
void —dd()
Drop and die a variable for showing value
dd([ $data = "d function stop" ][, int|null $line_number = null ][, int|null $file_name = null ]) : void
Parameters
Tags
Return values
void —js()
Add javaScript code to HTML page
js(string $input) : void
Parameters
- $input : string
Tags
Return values
void —redirect()
Change URL path with PHP
redirect([string $url = "/" ][, int $statusCode = 303 ]) : void
Parameters
- $url : string = "/"
- $statusCode : int = 303
Tags
Return values
void —is_post()
Check request method is POST?
is_post() : bool
Tags
Return values
bool —is_get()
Check request method is GET?
is_get() : bool
Tags
Return values
bool —session()
Return session value if set
session([ $name = null ][, $value = null ]) : void
Parameters
Return values
void —e_session()
echo session value if set
e_session([ $name = null ]) : void
Parameters
Return values
void —randomatic()
Creare a random string with your pattern and length
randomatic([string $case = "a" ][, int $length = 1 ]) : bool
Parameters
- $case : string = "a"
-
Deafault is 'A' all option : "A|N|L|U|NL|NU|LU"
- $length : int = 1
-
Length of string default is '1'
Tags
Return values
bool —| string Return false or string pattern
check_cookie()
Chck cookie on ro off ?
check_cookie() : bool
Tags
Return values
bool —cookie()
Return Cookie value if it's set
cookie(string $cookie_name) : void
Parameters
- $cookie_name : string
-
Name of cookie
Tags
Return values
void —my_address()
Get url
my_address([bool $url = false ]) : string
Parameters
- $url : bool = false
Tags
Return values
string —error()
set error session
error([ $name = null ][, $value = null ]) : void