# Classes
# Cookie\helper
Cookie helper.
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
# Constants
This class has not constants.
# Methods
This magic method is called everytime an inaccessible method is called (either by visibility contrains or it doesn't exist) Here we are simulating shared protected methods across "package" classes This method is inherited by all child classes of Package.
public function __call( mixed $method, mixed $args ) : void
Parameter | Type(s) | Description |
---|---|---|
$method | mixed | |
$args | mixed |
Set cookie by days.
public static function day( mixed $name, mixed $value = true, mixed $expire, mixed $path = '/', mixed $domain = '', mixed $secure = false, mixed $httponly = false ) : void
Parameter | Type(s) | Description |
---|---|---|
$name | mixed | |
$value optional | mixed | |
$expire | mixed | |
$path optional | mixed | |
$domain optional | mixed | |
$secure optional | mixed | |
$httponly optional | mixed |
See also | \Cookie\helper::set() automatically set expire time to day format |
Delete cookie.
public static function del( mixed $name ) : boolean
Parameter | Type(s) | Description |
---|---|---|
$name | mixed |
Returns:
true | false | null * return true if success and exists * return false if cookie not exists * return null if $_COOKIE constant not exists
Destroy all cookies except php session and spesific cookies name.
public static function destroy( mixed $except = array() ) : void
Parameter | Type(s) | Description |
---|---|---|
$except optional | mixed |
public static function domain( mixed $domain ) : void
Parameter | Type(s) | Description |
---|---|---|
$domain | mixed |
Get Cookie By Name.
public static function get( mixed $name, mixed $AllowEmpty = true ) : string|array|null
Parameter | Type(s) | Description |
---|---|---|
$name | mixed | |
$AllowEmpty optional | mixed |
Check cookie exist.
public static function has( mixed $name, boolean $AllowEmpty = true ) : boolean|null
Parameter | Type(s) | Description |
---|---|---|
$name | mixed | |
$AllowEmpty optional | boolean | if true, will return false if cookie value empty |
Returns:
true
indicated exists,
null
indicated empty value,
false
indicated not set
Set cookie by hours.
public static function hours( mixed $name, mixed $value = true, mixed $expire = 1, mixed $path = '/', mixed $domain = '', mixed $secure = false, mixed $httponly = false ) : void
Parameter | Type(s) | Description |
---|---|---|
$name | mixed | |
$value optional | mixed | |
$expire optional | mixed | |
$path optional | mixed | |
$domain optional | mixed | |
$secure optional | mixed | |
$httponly optional | mixed |
See also | \Cookie\helper::set() automatically set expire time to hours format |
Set cookie by minutes.
public static function mins( mixed $name, mixed $value = true, mixed $expire, mixed $path = '/', mixed $domain = '', mixed $secure = false, mixed $httponly = false ) : void
Parameter | Type(s) | Description |
---|---|---|
$name | mixed | |
$value optional | mixed | |
$expire | mixed | |
$path optional | mixed | |
$domain optional | mixed | |
$secure optional | mixed | |
$httponly optional | mixed |
See also | \Cookie\helper::set() automatically set expire time to minutes format |
one time function when cookie name empty.
public static function one( mixed $cookie_name, mixed $value, integer $minutes, callable $callback ) : void
Parameter | Type(s) | Description |
---|---|---|
$cookie_name | mixed | |
$value | mixed | |
$minutes | integer | minute to be expired |
$callback | callable |
public static function reconstruct_url( mixed $url ) : void
Parameter | Type(s) | Description |
---|---|---|
$url | mixed |
public static function secure( mixed $secure ) : void
Parameter | Type(s) | Description |
---|---|---|
$secure | mixed |
Set cookie helper.
public static function set( mixed $name, mixed $value, float|integer|string $expire, mixed $path = '/', string $domain = '', boolean $secure = false, boolean $httponly = false ) : \Cookie\setcookie
Parameter | Type(s) | Description |
---|---|---|
$name | mixed | |
$value | mixed | |
$expire | float integer string | 1m/1h/1d/1y default m(minute) |
$path optional | mixed | |
$domain optional | string | default $_SERVER['HTTP_HOST'] |
$secure optional | boolean | |
$httponly optional | boolean |
# Inherited methods
This class has not inherited methods.
# Properties
# Inherited properties
This class has not inherited properties.
# DB\Backup
The Backup_Database class.
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
# Constants
This class has not constants.
# Methods
Constructor initializes database.
public function __construct( mixed $host, mixed $username, mixed $passwd, mixed $dbName, mixed $charset = 'utf8' ) : void
Parameter | Type(s) | Description |
---|---|---|
$host | mixed | |
$username | mixed | |
$passwd | mixed | |
$dbName | mixed | |
$charset optional | mixed |
Backup the whole database or just some tables Use '*' for whole database or 'table1 table2 table3.
public function backupTables( string $tables = '*' ) : void
Parameter | Type(s) | Description |
---|---|---|
$tables optional | string |
Description:
..'.
Download SQL File To Client Browser.
public function download( mixed $sqlFile ) : void
Parameter | Type(s) | Description |
---|---|---|
$sqlFile | mixed |
Save SQL to file.
protected function saveFile( string &$sql, string $format = '' ) : void
Parameter | Type(s) | Description |
---|---|---|
$sql | string | |
$format optional | string | date('Ymd-His', time()) or other |
# Inherited methods
This class has not inherited methods.
# Properties
# Inherited properties
This class has not inherited properties.
# DB\EPDOStatement
Extends | \ |
Implements | Psr\Log\LoggerAwareInterface |
Uses | Nothing |
# Constants
WARNING_USING_ADDSLASHES
WARNING_USING_ADDSLASHES = 'addslashes is not suitable for production logging, etc. Please consider updating your processes to provide a valid PDO object that can perform the necessary translations and can be updated with your e.g. package management, etc.';
Type: mixed
# Methods
The first argument passed in should be an instance of the PDO object. If so, we'll cache it's reference locally to allow for the best escaping possible later when interpolating our query. Other parameters can be added if needed.
protected function __construct( \PDO $pdo = null ) : void
Parameter | Type(s) | Description |
---|---|---|
$pdo optional | \PDO |
public function _debugQuery( mixed $replaced = true ) : void
Parameter | Type(s) | Description |
---|---|---|
$replaced optional | mixed |
protected function _debugReplace( mixed $m ) : void
Parameter | Type(s) | Description |
---|---|---|
$m | mixed |
Overrides the default \PDOStatement method to add the named parameter and it's reference to the array of bound parameters - then accesses and returns parent::bindParam method.
public function bindParam( string $param, mixed &$value, integer $datatype = \PDO::PARAM_STR, integer $length = 0, mixed $driverOptions = false ) : boolean
Parameter | Type(s) | Description |
---|---|---|
$param | string | |
$value | mixed | |
$datatype optional | integer | |
$length optional | integer | |
$driverOptions optional | mixed |
Returns:
- default of \PDOStatement::bindParam()
Overrides the default \PDOStatement method to add the named parameter and it's value to the array of bound values
- then accesses and returns parent::bindValue method.
public function bindValue( string $param, mixed $value, integer $datatype = \PDO::PARAM_STR ) : boolean
Parameter | Type(s) | Description |
---|---|---|
$param | string | |
$value | mixed | |
$datatype optional | integer |
Returns:
- default of \PDOStatement::bindValue()
Overrides the default \PDOStatement method to generate the full query string - then accesses and returns parent::execute method.
public function execute( array $inputParams = array() ) : boolean
Parameter | Type(s) | Description |
---|---|---|
$inputParams optional | array |
Returns:
- default of \PDOStatement::execute()
Copies $this->queryString then replaces bound markers with associated values ($this->queryString is not modified but the resulting query string is assigned to $this->fullQuery).
public function interpolateQuery( array $inputParams = null ) : string
Parameter | Type(s) | Description |
---|---|---|
$inputParams optional | array | - array of values to replace ? marked parameters in the query string |
Returns:
$testQuery - interpolated db query string
{@inheritdoc}
public function setLogger( \Psr\Log\LoggerInterface $logger ) : void
Parameter | Type(s) | Description |
---|---|---|
$logger | \Psr\Log\LoggerInterface |
# Inherited methods
This class has not inherited methods.
# Properties
# Inherited properties
This class has not inherited properties.
# DB\manager
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
# Constants
This class has not constants.
# Methods
public function backup_tables( mixed $host, mixed $user, mixed $pass, mixed $name, mixed $nama_file, mixed $tables = '*' ) : void
Parameter | Type(s) | Description |
---|---|---|
$host | mixed | |
$user | mixed | |
$pass | mixed | |
$name | mixed | |
$nama_file | mixed | |
$tables optional | mixed |
# Inherited methods
This class has not inherited methods.
# Properties
This class has not properties.
# Inherited properties
This class has not inherited properties.
# DB\schema
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
# Constants
This class has not constants.
# Methods
Get ENUM or SET values.
public static function get_enumset_values( \DB\pdo $pdo, mixed $table, mixed $field ) : array
Parameter | Type(s) | Description |
---|---|---|
$pdo | \DB\pdo | |
$table | mixed | |
$field | mixed |
Replaces any parameter placeholders in a query with the value of that parameter. Useful for debugging. Assumes anonymous parameters from $params are are in the same order as specified in $query.
public static function interpolateQuery( string $query, array $params ) : string
Parameter | Type(s) | Description |
---|---|---|
$query | string | The sql query with parameter placeholders |
$params | array | The array of substitution parameters |
Returns:
The interpolated query
modify_enumset_values ( ) static
Modify ENUM or SET values.
public static function modify_enumset_values( \DB\pdo $pdo, mixed $table, mixed $field, array $newData ) : array
Parameter | Type(s) | Description |
---|---|---|
$pdo | \DB\pdo | |
$table | mixed | |
$field | mixed | |
$newData | array |
See also | https://stackoverflow.com/questions/1501958/how-do-i-add-more-members-to-my-enum-type-column-in-mysql |
# Inherited methods
This class has not inherited methods.
# Properties
This class has not properties.
# Inherited properties
This class has not inherited properties.
# Filemanager\file
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
# Constants
This class has not constants.
# Methods
public function cleanDump( mixed $c, mixed $_ ) : void
Parameter | Type(s) | Description |
---|---|---|
$c | mixed | |
$_ | mixed |
Create file and directory recursively.
public function createFile( string $path, boolean $create = true, boolean $force = false, boolean $append = false, mixed $dump = false ) : string
Parameter | Type(s) | Description |
---|---|---|
$path | string | File Path |
$create optional | boolean | * true to create * false to abort create |
$force optional | boolean | * true force overwrite * false not create if exists |
$append optional | boolean | append to file |
$dump optional | mixed |
Returns:
filepath
Create folder recursively.
public function createFolder( string $d, mixed $root = null, boolean $noroot = null, mixed $dump = false ) : string
Parameter | Type(s) | Description |
---|---|---|
$d | string | pathname or dirname |
$root optional | mixed | root directory * default $_SERVER['DOCUMENT_ROOT'] |
$noroot optional | boolean | false will return begins with $root |
$dump optional | mixed |
Recursive delete.
public static function delete( string $path ) : void
Parameter | Type(s) | Description |
---|---|---|
$path | string | files or folder |
Delete Non-Empty Directory.
public static function deleteDirectory( mixed $dir ) : boolean
Parameter | Type(s) | Description |
---|---|---|
$dir | mixed |
Delete file.
public function deleteFile( mixed $file ) : boolean
Parameter | Type(s) | Description |
---|---|---|
$file | mixed |
public function destroy_old_files( mixed $dir, mixed $sec = 3600, mixed $prefix = null ) : void
Parameter | Type(s) | Description |
---|---|---|
$dir | mixed | |
$sec optional | mixed | |
$prefix optional | mixed |
public function determineContent( mixed $create ) : void
Parameter | Type(s) | Description |
---|---|---|
$create | mixed |
Iterate files in directory.
public static function directoryIterator( string $path ) : array
Parameter | Type(s) | Description |
---|---|---|
$path | string |
Flush directory.
public static function emptyDir( mixed $dir ) : void
Parameter | Type(s) | Description |
---|---|---|
$dir | mixed |
Create file nested.
public static function file( mixed $path, boolean $create = true, boolean $force = false, boolean $append = false, boolean $dump = false ) : string
Parameter | Type(s) | Description |
---|---|---|
$path | mixed | |
$create optional | boolean | content |
$force optional | boolean | |
$append optional | boolean | |
$dump optional | boolean |
public static function folder( mixed $path ) : mixed
Parameter | Type(s) | Description |
---|---|---|
$path | mixed |
Read file with json decode support.
public static function get( string $file, boolean $parse_json = false ) : string|array
Parameter | Type(s) | Description |
---|---|---|
$file | string | |
$parse_json optional | boolean |
Returns:
NULL = failed
Create folder 777.
public function mkdir( mixed $x ) : void
Parameter | Type(s) | Description |
---|---|---|
$x | mixed |
public static function remove( mixed $str ) : void
Parameter | Type(s) | Description |
---|---|---|
$str | mixed |
Normalize Path To Linux Format.
public function smartFilePath( string $path ) : string
Parameter | Type(s) | Description |
---|---|---|
$path | string |
Returns:
$dir
public static function toUnixPath( mixed $path ) : void
Parameter | Type(s) | Description |
---|---|---|
$path | mixed |
Initialize File (Alternative Multiple Constructor).
public static function withPath( mixed $filepath ) : void
Parameter | Type(s) | Description |
---|---|---|
$filepath | mixed |
See also | https://stackoverflow.com/a/1701337 |
Write file recursive.
public static function write( string $path, string $content = '', boolean $append = false ) : string
Parameter | Type(s) | Description |
---|---|---|
$path | string | |
$content optional | string | |
$append optional | boolean |
# Inherited methods
This class has not inherited methods.
# Properties
# Inherited properties
This class has not inherited properties.
# Filemanager\scan
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
# Constants
This class has not constants.
# Methods
public function __construct( mixed $opt = array() ) : void
Parameter | Type(s) | Description |
---|---|---|
$opt optional | mixed |
public static function scanAllFiles( mixed $dir, mixed $exclude = '/^(.{1,2}|\.htaccess)$/s' ) : void
Parameter | Type(s) | Description |
---|---|---|
$dir | mixed | |
$exclude optional | mixed |
public static function scandir( mixed $dir ) : void
Parameter | Type(s) | Description |
---|---|---|
$dir | mixed |
# Inherited methods
This class has not inherited methods.
# Properties
# Inherited properties
This class has not inherited properties.
# GoogleExt\Attributes
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
# Constants
This class has not constants.
# Methods
This class has not methods.
# Inherited methods
This class has not inherited methods.
# Properties
# Inherited properties
This class has not inherited properties.
# GoogleExt\Author
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
# Constants
This class has not constants.
# Methods
This class has not methods.
# Inherited methods
This class has not inherited methods.
# Properties
# Inherited properties
This class has not inherited properties.
# GoogleExt\Blog
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
# Constants
This class has not constants.
# Methods
This class has not methods.
# Inherited methods
This class has not inherited methods.
# Properties
# Inherited properties
This class has not inherited properties.
# GoogleExt\blogger
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
# Constants
This class has not constants.
# Methods
public function __construct( \Google\Client|\GoogleExt\client $client ) : void
Parameter | Type(s) | Description |
---|---|---|
$client | \Google\Client \GoogleExt\client |
Get blog information by id.
public function byId( integer|string $blogId ) : \GoogleExt\Google_Service_Blogger_Blog2|\Google_Service_Blogger_Blog
Parameter | Type(s) | Description |
---|---|---|
$blogId | integer string |
Get blog information by url.
public function byUrl( mixed $url ) : \Google_Service_Blogger_Blog|\GoogleExt\Google_Service_Blogger_Blog2
Parameter | Type(s) | Description |
---|---|---|
$url | mixed |
Get Post Information By Id.
public function getPost( string $id ) : \GoogleExt\Blogger_Post
Parameter | Type(s) | Description |
---|---|---|
$id | string |
Get All Blogger Posts.
public function getPosts( boolean $force = false ) : array<mixed,\GoogleExt\Blogger_Post>
Parameter | Type(s) | Description |
---|---|---|
$force optional | boolean | recrawl |
public function listPosts( mixed $limit = 5 ) : void
Parameter | Type(s) | Description |
---|---|---|
$limit optional | mixed |
# Inherited methods
This class has not inherited methods.
# Properties
# Inherited properties
This class has not inherited properties.
# GoogleExt\Blogger_Post
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
# Constants
This class has not constants.
# Methods
public function __construct( mixed $deserializedJson, mixed $fromCache = false ) : void
Parameter | Type(s) | Description |
---|---|---|
$deserializedJson | mixed | |
$fromCache optional | mixed |
# Inherited methods
This class has not inherited methods.
# Properties
Categories.
public $category = array();
Types:
array<mixed,\GoogleExt\Category>
-array<mixed,\GoogleExt\Attributes>
# Inherited properties
This class has not inherited properties.
# GoogleExt\Category
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
# Constants
This class has not constants.
# Methods
This class has not methods.
# Inherited methods
This class has not inherited methods.
# Properties
# Inherited properties
This class has not inherited properties.
# GoogleExt\Google_Service_Blogger_Blog2
Extends | GoogleExt\Serializer |
Implements | Nothing |
Uses | Nothing |
# Constants
This class has not constants.
# Methods
public function __construct( mixed $deserializedJson ) : void
Parameter | Type(s) | Description |
---|---|---|
$deserializedJson | mixed |
# Inherited methods
This class has not inherited methods.
# Properties
This class has not properties.
# Inherited properties
# GoogleExt\Image
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
# Constants
This class has not constants.
# Methods
This class has not methods.
# Inherited methods
This class has not inherited methods.
# Properties
# Inherited properties
This class has not inherited properties.
# GoogleExt\Link
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
# Constants
This class has not constants.
# Methods
This class has not methods.
# Inherited methods
This class has not inherited methods.
# Properties
# Inherited properties
This class has not inherited properties.
# GoogleExt\Locale
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
# Constants
This class has not constants.
# Methods
This class has not methods.
# Inherited methods
This class has not inherited methods.
# Properties
# Inherited properties
This class has not inherited properties.
# GoogleExt\Pages
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
# Constants
This class has not constants.
# Methods
This class has not methods.
# Inherited methods
This class has not inherited methods.
# Properties
# Inherited properties
This class has not inherited properties.
# GoogleExt\Posts
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
# Constants
This class has not constants.
# Methods
This class has not methods.
# Inherited methods
This class has not inherited methods.
# Properties
# Inherited properties
This class has not inherited properties.
# GoogleExt\recaptcha
Google Recaptcha.
$recap = new GoogleExt\recaptcha();
// using manual token
$recaptcha->verify("Generated Token Here", function ($success, $response, $token) { e(func_get_args()); });
// using g-recaptcha-response
$recaptcha->verify($_REQUEST['g-recaptcha-response'], function ($success, $response, $token) { e(func_get_args()); });
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
# Constants
This class has not constants.
# Methods
Verify Recaptcha.
public function verify( string $token, callable $callback ) : void
Parameter | Type(s) | Description |
---|---|---|
$token | string | |
$callback | callable |
# Inherited methods
This class has not inherited methods.
# Properties
Secret Key (Default from config.json).
public static $secretKey = CONFIG['google']['recaptcha']['secret'];
Types:
string
# Inherited properties
This class has not inherited properties.
# GoogleExt\Replies
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
# Constants
This class has not constants.
# Methods
This class has not methods.
# Inherited methods
This class has not inherited methods.
# Properties
# Inherited properties
This class has not inherited properties.
# GoogleExt\Serializer
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
# Constants
This class has not constants.
# Methods
This class has not methods.
# Inherited methods
This class has not inherited methods.
# Properties
# Inherited properties
This class has not inherited properties.
# GoogleExt\Translator
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
# Constants
This class has not constants.
# Methods
Insert Target String To Be Translated.
public function insert( string $content ) : void
Parameter | Type(s) | Description |
---|---|---|
$content | string |
# Inherited methods
This class has not inherited methods.
# Properties
This class has not properties.
# Inherited properties
This class has not inherited properties.
# JSON\json
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
# Constants
This class has not constants.
# Methods
Force Assoc.
public static function assoc( array|object $arr ) : \JSON\json_decode
Parameter | Type(s) | Description |
---|---|---|
$arr | array object |
beautify JSON.
public static function beautify( \stdClass|array|object|string $data ) : string
Parameter | Type(s) | Description |
---|---|---|
$data | \stdClass array object string |
Validate json string.
public static function is_json( string $string ) : boolean
Parameter | Type(s) | Description |
---|---|---|
$string | string |
public static function isJson( mixed $string ) : void
Parameter | Type(s) | Description |
---|---|---|
$string | mixed |
JSON formatter.
public static function json( mixed $data = array(), boolean $header = true, boolean $print = true ) : void
Parameter | Type(s) | Description |
---|---|---|
$data optional | mixed | |
$header optional | boolean | |
$print optional | boolean |
json_decode default assoc.
public static function json_decode( mixed $str, mixed $err_callback = null, boolean $assoc = true ) : \JSON\json_decode
Parameter | Type(s) | Description |
---|---|---|
$str | mixed | |
$err_callback optional | mixed | |
$assoc optional | boolean |
JSON error explanatory.
public static function json_last_error_e( ) : void
JSON decode with verification.
public static function jsond( string $str, mixed $callback = null ) : void
Parameter | Type(s) | Description |
---|---|---|
$str | string | |
$callback optional | mixed |
public static function jsonDecode( mixed $input ) : void
Parameter | Type(s) | Description |
---|---|---|
$input | mixed |
Load JSON.
public function load( mixed $file, mixed $assoc = false ) : void
Parameter | Type(s) | Description |
---|---|---|
$file | mixed | |
$assoc optional | mixed |
# Inherited methods
This class has not inherited methods.
# Properties
# Inherited properties
This class has not inherited properties.
# MVC\captcha
Extends | MVC\router |
Implements | Nothing |
Uses | Nothing |
# Constants
This class has not constants.
# Methods
public function jpeg( mixed $captcha_code ) : void
Parameter | Type(s) | Description |
---|---|---|
$captcha_code | mixed |
Receiver (Create captcha).
public function receiver( string $header_name = 'hname' ) : void
Parameter | Type(s) | Description |
---|---|---|
$header_name optional | string | javascript function name in header format |
public function receiver2( mixed $header_name = null ) : void
Parameter | Type(s) | Description |
---|---|---|
$header_name optional | mixed |
Validate coupon codes.
public function validate( mixed $captcha ) : void
Parameter | Type(s) | Description |
---|---|---|
$captcha | mixed |
# Inherited methods
MVC\router::safe_redirect() static
MVC\router::get_env() static
# Properties
# Inherited properties
# MVC\Exception
Extends | \ |
Implements | Nothing |
Uses | Nothing |
# Constants
This class has not constants.
# Methods
public function __construct( mixed $message, mixed $code = 0, \MVC\Exception $previous = null ) : void
Parameter | Type(s) | Description |
---|---|---|
$message | mixed | |
$code optional | mixed | |
$previous optional | \MVC\Exception |
# Inherited methods
This class has not inherited methods.
# Properties
This class has not properties.
# Inherited properties
This class has not inherited properties.
# MVC\helper
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
# Constants
This class has not constants.
# Methods
_cloudflare_CheckIP ( ) static
public static function _cloudflare_CheckIP( mixed $ip ) : void
Parameter | Type(s) | Description |
---|---|---|
$ip | mixed |
public static function asset_find( mixed $fn = array() ) : void
Parameter | Type(s) | Description |
---|---|---|
$fn optional | mixed |
public static function babel( mixed $path ) : void
Parameter | Type(s) | Description |
---|---|---|
$path | mixed |
Get path base URL
- example (/cookie/file.html) -> (https://httpbin.org/cookie/file.html).
public static function base_url( string $path, boolean $forceSSL = false ) : string
Parameter | Type(s) | Description |
---|---|---|
$path | string | pathname from base url |
$forceSSL optional | boolean | force https protocol returned * true or false or null |
Returns:
protocol://origin/pathname
clean_multiple_hypens ( ) static
public static function clean_multiple_hypens( mixed $string ) : void
Parameter | Type(s) | Description |
---|---|---|
$string | mixed |
clean_special_characters ( ) static
Clean special characters from string.
public static function clean_special_characters( mixed $string, string $replace = '' ) : string
Parameter | Type(s) | Description |
---|---|---|
$string | mixed | |
$replace optional | string |
public static function clean_whitespace( mixed $str ) : void
Parameter | Type(s) | Description |
---|---|---|
$str | mixed |
Cors domain verify, detect AJAX, and validate AJAX CORS.
public static function cors( boolean $print_server = false ) : void
Parameter | Type(s) | Description |
---|---|---|
$print_server optional | boolean | Debug mode |
public static function delcookie( mixed $name ) : void
Parameter | Type(s) | Description |
---|---|---|
$name | mixed |
if (env('dev')) return boolean; //is development environtment or not
Get environtment framework.
public static function env( string $for ) : string|boolean
Parameter | Type(s) | Description |
---|---|---|
$for | string | dev or prod |
Fix path string default OS
separate slash and replaced by /
- WIN (\)
- LINUX (/).
public static function fixSlash( mixed $path, mixed $maxlength = 10 ) : string
Parameter | Type(s) | Description |
---|---|---|
$path | mixed | |
$maxlength optional | mixed |
get canonical url.
public static function get_canonical( string $url = null, boolean $whos = true ) : void
Parameter | Type(s) | Description |
---|---|---|
$url optional | string | null for current page |
$whos optional | boolean | include host or not (http://domain) |
Get request uri
without parameter.
public static function get_clean_uri( string $url = null ) : string
Parameter | Type(s) | Description |
---|---|---|
$url optional | string |
Get URL from local file.
public static function get_url_path( array|string $path, boolean $cache = null ) : string
Parameter | Type(s) | Description |
---|---|---|
$path | array string | destinations * array will be looped, which found first, return them |
$cache optional | boolean |
Returns:
if empty == not found
Get Cookie By Name.
public static function getcookie( mixed $name ) : void
Parameter | Type(s) | Description |
---|---|---|
$name | mixed |
Get current URL.
public static function geturl( boolean $forceSSL = false ) : string
Parameter | Type(s) | Description |
---|---|---|
$forceSSL optional | boolean | force https protocol returned * true or false or null |
Returns:
protocol://origin/pathname
public static function headerExt( mixed $ext ) : void
Parameter | Type(s) | Description |
---|---|---|
$ext | mixed |
public static function include_asset( mixed $fn, mixed $fn2 = null, mixed $callback = null ) : void
Parameter | Type(s) | Description |
---|---|---|
$fn | mixed | |
$fn2 optional | mixed | |
$callback optional | mixed |
public static function ip_in_multirange( mixed $ip, array $ranges ) : void
Parameter | Type(s) | Description |
---|---|---|
$ip | mixed | |
$ranges | array |
Check if a given ip is in a network.
public static function ip_in_range( string $ip, string $range ) : boolean
Parameter | Type(s) | Description |
---|---|---|
$ip | string | IP to check in IPV4 format eg. 127.0.0.1 |
$range | string | IP/CIDR netmask eg. 127.0.0.0/24, also 127.0.0.1 is accepted and /32 assumed |
See also | https://gist.github.com/ryanwinchester/578c5b50647df3541794 |
Returns:
true if the ip is in this range / false if not
Check if header request has $any.
public static function is_header( mixed $any ) : string|null
Parameter | Type(s) | Description |
---|---|---|
$any | mixed |
is url ?
public static function is_url( string $url ) : boolean
Parameter | Type(s) | Description |
---|---|---|
$url | string |
Check if current is localhost.
public static function isLocal( string $regex = null ) : boolean
Parameter | Type(s) | Description |
---|---|---|
$regex optional | string | new regex |
public static function load_asset( mixed $path ) : void
Parameter | Type(s) | Description |
---|---|---|
$path | mixed |
Parse URL deeper.
public static function parse_url2( string $url, boolean $encoded = false ) : \MVC\parse_url
Parameter | Type(s) | Description |
---|---|---|
$url | string | |
$encoded optional | boolean |
GET PHP ERROR LOG.
public static function php_error_log( mixed $onlypath = false ) : string|null
Parameter | Type(s) | Description |
---|---|---|
$onlypath optional | mixed |
public static function platformSlashes( mixed $path ) : void
Parameter | Type(s) | Description |
---|---|---|
$path | mixed |
Get request data
- $_GET[$name]
- $_REQUEST[$name]
- $_POST[$name].
public static function request_data( string $type = 'get', mixed $name ) : string|null
Parameter | Type(s) | Description |
---|---|---|
$type optional | string | request method * get = only accept get * post = only accept post * any = accept all request |
$name | mixed | What data requests will you take? |
public static function require_method( mixed $method ) : void
Parameter | Type(s) | Description |
---|---|---|
$method | mixed |
Minify HTML.
public static function sanitize_output( string $buffer ) : void
Parameter | Type(s) | Description |
---|---|---|
$buffer | string |
Sass Compiler.
public static function sass( mixed $path ) : void
Parameter | Type(s) | Description |
---|---|---|
$path | mixed |
Set cookie helper.
public static function setcookie( mixed $name, mixed $value = true, float|integer $day, string $path = '/', string $domain = '', boolean $secure = false, boolean $httponly = false ) : void
Parameter | Type(s) | Description |
---|---|---|
$name | mixed | |
$value optional | mixed | |
$day | float integer | |
$path optional | string | |
$domain optional | string | |
$secure optional | boolean | |
$httponly optional | boolean |
public static function trycatch( mixed $try ) : void
Parameter | Type(s) | Description |
---|---|---|
$try | mixed |
transfor url to host (domain only).
public static function url2host( mixed $url, mixed $fallback = null ) : string|null
Parameter | Type(s) | Description |
---|---|---|
$url | mixed | |
$fallback optional | mixed | if url is not valid return $fallback value |
public static function webkit_asset( mixed $path, mixed $alternative = null ) : void
Parameter | Type(s) | Description |
---|---|---|
$path | mixed | |
$alternative optional | mixed |
# Inherited methods
This class has not inherited methods.
# Properties
# Inherited properties
This class has not inherited properties.
# MVC\router
Extends | MVC\themes |
Implements | Nothing |
Uses | Nothing |
# Constants
This class has not constants.
# Methods
public function config( mixed $router ) : void
Parameter | Type(s) | Description |
---|---|---|
$router | mixed |
Define environtment
- development / production.
public function environtment( mixed $env = 'production' ) : string
Parameter | Type(s) | Description |
---|---|---|
$env optional | mixed |
Check browser no-cache request (hard reload).
public function is_hard_reload( ) : boolean
Check if header request has $any.
public function is_header( mixed $any ) : string|null
Parameter | Type(s) | Description |
---|---|---|
$any | mixed |
public function is_post( mixed $any, mixed $alternative = null ) : void
Parameter | Type(s) | Description |
---|---|---|
$any | mixed | |
$alternative optional | mixed |
public function is_req( mixed $any, mixed $alternative = null ) : void
Parameter | Type(s) | Description |
---|---|---|
$any | mixed | |
$alternative optional | mixed |
check if one of the headers exists.
public function is_reqs( mixed $anys ) : boolean|string
Parameter | Type(s) | Description |
---|---|---|
$anys | mixed |
Description:
if ($this->is_reqs(['DNT', 'Connection']))
public function redirect( mixed $path ) : void
Parameter | Type(s) | Description |
---|---|---|
$path | mixed |
Safe redirect, support any conditions.
public static function safe_redirect( mixed $path ) : void
Parameter | Type(s) | Description |
---|---|---|
$path | mixed |
# Inherited methods
# Properties
# Inherited properties
# MVC\themes
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
# Constants
This class has not constants.
# Methods
public function date( mixed $time, mixed $format = 'm/j/y g:i A' ) : void
Parameter | Type(s) | Description |
---|---|---|
$time | mixed | |
$format optional | mixed |
Dump this variable.
public function dump( \MVC\variadic $var ) : void
Parameter | Type(s) | Description |
---|---|---|
$var | \MVC\variadic |
Transform to linux separated file.
public function fix_slash( mixed $path ) : void
Parameter | Type(s) | Description |
---|---|---|
$path | mixed |
Set Label Router.
public function label( mixed $label = 'default' ) : \MVC\themes
Parameter | Type(s) | Description |
---|---|---|
$label optional | mixed |
public function load_render( mixed $variables, mixed $print = true ) : void
Parameter | Type(s) | Description |
---|---|---|
$variables | mixed | |
$print optional | mixed |
public function modified( mixed $time ) : void
Parameter | Type(s) | Description |
---|---|---|
$time | mixed |
public function published( mixed $time ) : void
Parameter | Type(s) | Description |
---|---|---|
$time | mixed |
Remove root path.
public function remove_root( mixed $path ) : void
Parameter | Type(s) | Description |
---|---|---|
$path | mixed |
Include passed variable.
public function render( mixed $variables = array(), mixed $print = true ) : void
Parameter | Type(s) | Description |
---|---|---|
$variables optional | mixed | |
$print optional | mixed |
Set theme default.
public function set( mixed $theme, mixed $useTheme = true ) : $this
Parameter | Type(s) | Description |
---|---|---|
$theme | mixed | |
$useTheme optional | mixed |
setThemeByZones([ 'theme-name'=>['zone1', 'zone2'], 'another-theme'=>['zone3','zone4'], 'default-template'])
Set theme by zone divider.
public function setThemeByZones( mixed $config, mixed $default ) : $this
Parameter | Type(s) | Description |
---|---|---|
$config | mixed | |
$default | mixed |
Description:
if not exists in zone divider, will using default template.
Turn zone into maintenance mode (Maintenance page).
public function shutdown( array|string $zone ) : \MVC\themes
Parameter | Type(s) | Description |
---|---|---|
$zone | array string | if empty, will turn into maintenance mode in all zone |
public function thumbnail( mixed $src ) : void
Parameter | Type(s) | Description |
---|---|---|
$src | mixed |
# Inherited methods
This class has not inherited methods.
# Properties
# Inherited properties
This class has not inherited properties.
# MVC\uid
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
# Constants
This class has not constants.
# Methods
public static function checkRequestUID( mixed $header_name, mixed $regen_session_timeout = 60 ) : void
Parameter | Type(s) | Description |
---|---|---|
$header_name | mixed | |
$regen_session_timeout optional | mixed |
public static function receiveUID( mixed $header_name, mixed $regen_session_timeout = 60 ) : void
Parameter | Type(s) | Description |
---|---|---|
$header_name | mixed | |
$regen_session_timeout optional | mixed |
# Inherited methods
This class has not inherited methods.
# Properties
This class has not properties.
# Inherited properties
This class has not inherited properties.
# Session\FileSessionHandler
Extends | Nothing |
Implements | \SessionHandlerInterface |
Uses | Nothing |
# Constants
This class has not constants.
# Methods
public function __construct( mixed $sess_path, mixed $prefix = 'sess_', mixed $postfix = '' ) : void
Parameter | Type(s) | Description |
---|---|---|
$sess_path | mixed | |
$prefix optional | mixed | |
$postfix optional | mixed |
public function destroy( mixed $sess_id ) : void
Parameter | Type(s) | Description |
---|---|---|
$sess_id | mixed |
public function open( mixed $save_path, mixed $sess_name ) : void
Parameter | Type(s) | Description |
---|---|---|
$save_path | mixed | |
$sess_name | mixed |
public function write( mixed $sess_id, mixed $data ) : void
Parameter | Type(s) | Description |
---|---|---|
$sess_id | mixed | |
$data | mixed |
# Inherited methods
This class has not inherited methods.
# Properties
# Inherited properties
This class has not inherited properties.
# Session\session
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
# Constants
This class has not constants.
# Methods
public function __construct( mixed $timeout = 3600, mixed $session_folder = null ) : void
Parameter | Type(s) | Description |
---|---|---|
$timeout optional | mixed | |
$session_folder optional | mixed |
public static function get( mixed $key ) : void
Parameter | Type(s) | Description |
---|---|---|
$key | mixed |
public static function gets( mixed $keys ) : void
Parameter | Type(s) | Description |
---|---|---|
$keys | mixed |
public function handle( mixed $timeout, mixed $folder = null ) : void
Parameter | Type(s) | Description |
---|---|---|
$timeout | mixed | |
$folder optional | mixed |
Is session set ?
public static function has( mixed $key, mixed $empty = true ) : void
Parameter | Type(s) | Description |
---|---|---|
$key | mixed | |
$empty optional | mixed |
public function is_sess( mixed $session_name, mixed $not_found = null ) : void
Parameter | Type(s) | Description |
---|---|---|
$session_name | mixed | |
$not_found optional | mixed |
public function sess( mixed $key, mixed $val ) : void
Parameter | Type(s) | Description |
---|---|---|
$key | mixed | |
$val | mixed |
public static function set_session( mixed $data, mixed $value = null ) : void
Parameter | Type(s) | Description |
---|---|---|
$data | mixed | |
$value optional | mixed |
public function start_timeout( mixed $timeout = 5, mixed $probability = 100 ) : void
Parameter | Type(s) | Description |
---|---|---|
$timeout optional | mixed | |
$probability optional | mixed |
Unset Session.
public static function unses( \Session\Number|array|string $name ) : void
Parameter | Type(s) | Description |
---|---|---|
$name | \Session\Number array string |
# Inherited methods
This class has not inherited methods.
# Properties
# Inherited properties
This class has not inherited properties.
# simplehtmldom\Debug
Implements functions for debugging purposes. Debugging can be enabled and disabled on demand. Debug messages are send to error_log by default but it is also possible to register a custom debug handler.
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
# Constants
This class has not constants.
# Methods
Checks whether debug mode is enabled.
public static function isEnabled( ) : boolean
Returns:
true if debug mode is enabled, false otherwise
Adds a debug message to error_log if debug mode is enabled. Does nothing if debug mode is disabled.
public static function log( mixed $message ) : void
Parameter | Type(s) | Description |
---|---|---|
$message | mixed |
Adds a debug message to error_log if debug mode is enabled. Does nothing if debug mode is disabled. Each message is logged only once.
public static function log_once( mixed $message ) : void
Parameter | Type(s) | Description |
---|---|---|
$message | mixed |
Sets the debug handler.
public static function setDebugHandler( mixed $function = null ) : void
Parameter | Type(s) | Description |
---|---|---|
$function optional | mixed |
Description:
null
: error_log (default)
# Inherited methods
This class has not inherited methods.
# Properties
This class has not properties.
# Inherited properties
This class has not inherited properties.
# simplehtmldom\helper
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
# Constants
This class has not constants.
# Methods
str_get_html.
public static function str_get_html( \simplehtmldom\[type] $str, boolean $lowercase = true, boolean $forceTagsClosed = true, \simplehtmldom\[type] $target_charset = DEFAULT_TARGET_CHARSET, boolean $stripRN = true, \simplehtmldom\[type] $defaultBRText = DEFAULT_BR_TEXT, \simplehtmldom\[type] $defaultSpanText = DEFAULT_SPAN_TEXT ) : \simplehtmldom\HtmlDocument
Parameter | Type(s) | Description |
---|---|---|
$str | \simplehtmldom\[type] | |
$lowercase optional | boolean | |
$forceTagsClosed optional | boolean | |
$target_charset optional | \simplehtmldom\[type] | |
$stripRN optional | boolean | |
$defaultBRText optional | \simplehtmldom\[type] | |
$defaultSpanText optional | \simplehtmldom\[type] |
# Inherited methods
This class has not inherited methods.
# Properties
This class has not properties.
# Inherited properties
This class has not inherited properties.
# simplehtmldom\HtmlDocument
HTMLDocument class.
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
# Constants
This class has not constants.
# Methods
public function __call( mixed $func, mixed $args ) : void
Parameter | Type(s) | Description |
---|---|---|
$func | mixed | |
$args | mixed |
public function __construct( mixed $str = null, mixed $lowercase = true, mixed $forceTagsClosed = true, mixed $target_charset = DEFAULT_TARGET_CHARSET, mixed $stripRN = true, mixed $defaultBRText = DEFAULT_BR_TEXT, mixed $defaultSpanText = DEFAULT_SPAN_TEXT, mixed $options = 0 ) : void
Parameter | Type(s) | Description |
---|---|---|
$str optional | mixed | |
$lowercase optional | mixed | |
$forceTagsClosed optional | mixed | |
$target_charset optional | mixed | |
$stripRN optional | mixed | |
$defaultBRText optional | mixed | |
$defaultSpanText optional | mixed | |
$options optional | mixed |
protected function as_text_node( mixed $tag ) : void
Parameter | Type(s) | Description |
---|---|---|
$tag | mixed |
public function childNodes( mixed $idx = -1 ) : void
Parameter | Type(s) | Description |
---|---|---|
$idx optional | mixed |
protected function copy_skip( mixed $chars ) : void
Parameter | Type(s) | Description |
---|---|---|
$chars | mixed |
protected function copy_until( mixed $chars ) : void
Parameter | Type(s) | Description |
---|---|---|
$chars | mixed |
protected function copy_until_char( mixed $char ) : void
Parameter | Type(s) | Description |
---|---|---|
$char | mixed |
public function createElement( mixed $name, mixed $value = null ) : void
Parameter | Type(s) | Description |
---|---|---|
$name | mixed | |
$value optional | mixed |
public function createTextNode( mixed $value ) : void
Parameter | Type(s) | Description |
---|---|---|
$value | mixed |
public function dump( mixed $show_attr = true ) : void
Parameter | Type(s) | Description |
---|---|---|
$show_attr optional | mixed |
public function expect( mixed $selector, mixed $idx = null, mixed $lowercase = false ) : void
Parameter | Type(s) | Description |
---|---|---|
$selector | mixed | |
$idx optional | mixed | |
$lowercase optional | mixed |
Find elements by CSS Selector.
public function find( string $selector, \simplehtmldom\number|null $idx = null, boolean $lowercase = false ) : array<mixed,\simplehtmldom\HtmlNode>|\simplehtmldom\HtmlNode
Parameter | Type(s) | Description |
---|---|---|
$selector | string | CSS Selector |
$idx optional | \simplehtmldom\number null | |
$lowercase optional | boolean |
public function getElementById( mixed $id ) : void
Parameter | Type(s) | Description |
---|---|---|
$id | mixed |
public function getElementByTagName( mixed $name ) : void
Parameter | Type(s) | Description |
---|---|---|
$name | mixed |
public function getElementsById( mixed $id, mixed $idx = null ) : void
Parameter | Type(s) | Description |
---|---|---|
$id | mixed | |
$idx optional | mixed |
public function getElementsByTagName( mixed $name, mixed $idx = null ) : void
Parameter | Type(s) | Description |
---|---|---|
$name | mixed | |
$idx optional | mixed |
protected function link_nodes( mixed &$node, mixed $is_child ) : void
Parameter | Type(s) | Description |
---|---|---|
$node | mixed | |
$is_child | mixed |
public function load( mixed $str, mixed $lowercase = true, mixed $stripRN = true, mixed $defaultBRText = DEFAULT_BR_TEXT, mixed $defaultSpanText = DEFAULT_SPAN_TEXT, mixed $options = 0 ) : void
Parameter | Type(s) | Description |
---|---|---|
$str | mixed | |
$lowercase optional | mixed | |
$stripRN optional | mixed | |
$defaultBRText optional | mixed | |
$defaultSpanText optional | mixed | |
$options optional | mixed |
public function loadFile( mixed $file ) : void
Parameter | Type(s) | Description |
---|---|---|
$file | mixed |
protected function parse( mixed $trim = false ) : void
Parameter | Type(s) | Description |
---|---|---|
$trim optional | mixed |
protected function parse_attr( mixed $node, mixed $name, mixed &$space, mixed $trim ) : void
Parameter | Type(s) | Description |
---|---|---|
$node | mixed | |
$name | mixed | |
$space | mixed | |
$trim | mixed |
protected function prepare( mixed $str, mixed $lowercase = true, mixed $defaultBRText = DEFAULT_BR_TEXT, mixed $defaultSpanText = DEFAULT_SPAN_TEXT ) : void
Parameter | Type(s) | Description |
---|---|---|
$str | mixed | |
$lowercase optional | mixed | |
$defaultBRText optional | mixed | |
$defaultSpanText optional | mixed |
protected function read_tag( mixed $trim ) : void
Parameter | Type(s) | Description |
---|---|---|
$trim | mixed |
protected function remove_noise( mixed $pattern, mixed $remove_tag = false ) : void
Parameter | Type(s) | Description |
---|---|---|
$pattern | mixed | |
$remove_tag optional | mixed |
public function restore_noise( mixed $text ) : void
Parameter | Type(s) | Description |
---|---|---|
$text | mixed |
Save modified html.
public function save( string $filepath = '' ) : void
Parameter | Type(s) | Description |
---|---|---|
$filepath optional | string |
public function search_noise( mixed $text ) : void
Parameter | Type(s) | Description |
---|---|---|
$text | mixed |
public function set_callback( mixed $function_name ) : void
Parameter | Type(s) | Description |
---|---|---|
$function_name | mixed |
# Inherited methods
This class has not inherited methods.
# Properties
protected $self_closing_tags = array('area' => 1, 'base' => 1, 'br' => 1, 'col' => 1, 'embed' => 1, 'hr' => 1, 'img' => 1, 'input' => 1, 'link' => 1, 'meta' => 1, 'param' => 1, 'source' => 1, 'track' => 1, 'wbr' => 1);
Types:
mixed
protected $block_tags = array('body' => 1, 'div' => 1, 'form' => 1, 'root' => 1, 'span' => 1, 'table' => 1);
Types:
mixed
protected $optional_closing_tags = array('b' => array('b' => 1), 'dd' => array('dd' => 1, 'dt' => 1), 'dl' => array('dd' => 1, 'dt' => 1), 'dt' => array('dd' => 1, 'dt' => 1), 'li' => array('li' => 1), 'optgroup' => array('optgroup' => 1, 'option' => 1), 'option' => array('optgroup' => 1, 'option' => 1), 'p' => array('p' => 1), 'rp' => array('rp' => 1, 'rt' => 1), 'rt' => array('rp' => 1, 'rt' => 1), 'td' => array('td' => 1, 'th' => 1), 'th' => array('td' => 1, 'th' => 1), 'tr' => array('td' => 1, 'th' => 1, 'tr' => 1));
Types:
mixed
# Inherited properties
This class has not inherited properties.
# simplehtmldom\HtmlNode
HTMLNode class.
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
# Constants
HDOM_INFO_BEGIN
HDOM_INFO_BEGIN = 0;
Type: mixed
HDOM_INFO_END
HDOM_INFO_END = 1;
Type: mixed
HDOM_INFO_ENDSPACE
HDOM_INFO_ENDSPACE = 7;
Type: mixed
HDOM_INFO_INNER
HDOM_INFO_INNER = 5;
Type: mixed
HDOM_INFO_OUTER
HDOM_INFO_OUTER = 6;
Type: mixed
HDOM_INFO_QUOTE
HDOM_INFO_QUOTE = 2;
Type: mixed
HDOM_INFO_SPACE
HDOM_INFO_SPACE = 3;
Type: mixed
HDOM_INFO_TEXT
HDOM_INFO_TEXT = 4;
Type: mixed
HDOM_QUOTE_DOUBLE
HDOM_QUOTE_DOUBLE = 0;
Type: mixed
HDOM_QUOTE_NO
HDOM_QUOTE_NO = 3;
Type: mixed
HDOM_QUOTE_SINGLE
HDOM_QUOTE_SINGLE = 1;
Type: mixed
HDOM_TYPE_CDATA
HDOM_TYPE_CDATA = 7;
Type: mixed
HDOM_TYPE_COMMENT
HDOM_TYPE_COMMENT = 2;
Type: mixed
HDOM_TYPE_ELEMENT
HDOM_TYPE_ELEMENT = 1;
Type: mixed
HDOM_TYPE_ROOT
HDOM_TYPE_ROOT = 5;
Type: mixed
HDOM_TYPE_TEXT
HDOM_TYPE_TEXT = 3;
Type: mixed
HDOM_TYPE_UNKNOWN
HDOM_TYPE_UNKNOWN = 6;
Type: mixed
# Methods
public function __call( mixed $func, mixed $args ) : void
Parameter | Type(s) | Description |
---|---|---|
$func | mixed | |
$args | mixed |
public function __construct( mixed $dom ) : void
Parameter | Type(s) | Description |
---|---|---|
$dom | mixed |
public function __set( mixed $name, mixed $value ) : void
Parameter | Type(s) | Description |
---|---|---|
$name | mixed | |
$value | mixed |
public function addClass( mixed $class ) : void
Parameter | Type(s) | Description |
---|---|---|
$class | mixed |
public function appendChild( mixed $node ) : void
Parameter | Type(s) | Description |
---|---|---|
$node | mixed |
public function childNodes( mixed $idx = -1 ) : void
Parameter | Type(s) | Description |
---|---|---|
$idx optional | mixed |
public function convert_text( mixed $text ) : void
Parameter | Type(s) | Description |
---|---|---|
$text | mixed |
public function dump( mixed $show_attr = true, mixed $depth = 0 ) : void
Parameter | Type(s) | Description |
---|---|---|
$show_attr optional | mixed | |
$depth optional | mixed |
public function dump_node( mixed $echo = true ) : void
Parameter | Type(s) | Description |
---|---|---|
$echo optional | mixed |
public function expect( mixed $selector, mixed $idx = null, mixed $lowercase = false ) : void
Parameter | Type(s) | Description |
---|---|---|
$selector | mixed | |
$idx optional | mixed | |
$lowercase optional | mixed |
Element selector.
public function find( string $selector, integer $idx = null, boolean $lowercase = false ) : \simplehtmldom\HtmlNode
Parameter | Type(s) | Description |
---|---|---|
$selector | string | |
$idx optional | integer | |
$lowercase optional | boolean |
public function find_ancestor_tag( mixed $tag ) : void
Parameter | Type(s) | Description |
---|---|---|
$tag | mixed |
public function getAttribute( mixed $name ) : void
Parameter | Type(s) | Description |
---|---|---|
$name | mixed |
public function getElementById( mixed $id ) : void
Parameter | Type(s) | Description |
---|---|---|
$id | mixed |
public function getElementByTagName( mixed $name ) : void
Parameter | Type(s) | Description |
---|---|---|
$name | mixed |
public function getElementsById( mixed $id, mixed $idx = null ) : void
Parameter | Type(s) | Description |
---|---|---|
$id | mixed | |
$idx optional | mixed |
public function getElementsByTagName( mixed $name, mixed $idx = null ) : void
Parameter | Type(s) | Description |
---|---|---|
$name | mixed | |
$idx optional | mixed |
public function hasAttribute( mixed $name ) : void
Parameter | Type(s) | Description |
---|---|---|
$name | mixed |
public function hasClass( mixed $class ) : void
Parameter | Type(s) | Description |
---|---|---|
$class | mixed |
Returns true if the provided element is a block level element.
protected function is_block_element( mixed $node ) : void
Parameter | Type(s) | Description |
---|---|---|
$node | mixed |
See also | https://www.w3resource.com/html/HTML-block-level-and-inline-elements.php |
Returns true if the provided element is an inline level element.
protected function is_inline_element( mixed $node ) : void
Parameter | Type(s) | Description |
---|---|---|
$node | mixed |
See also | https://www.w3resource.com/html/HTML-block-level-and-inline-elements.php |
public static function is_utf8( mixed $str ) : void
Parameter | Type(s) | Description |
---|---|---|
$str | mixed |
protected function match( mixed $exp, mixed $pattern, mixed $value, mixed $case_sensitivity ) : void
Parameter | Type(s) | Description |
---|---|---|
$exp | mixed | |
$pattern | mixed | |
$value | mixed | |
$case_sensitivity | mixed |
public function parent( mixed $parent = null ) : void
Parameter | Type(s) | Description |
---|---|---|
$parent optional | mixed |
protected function parse_selector( mixed $selector_string ) : void
Parameter | Type(s) | Description |
---|---|---|
$selector_string | mixed |
public function removeAttribute( mixed $name ) : void
Parameter | Type(s) | Description |
---|---|---|
$name | mixed |
public function removeChild( mixed $node ) : void
Parameter | Type(s) | Description |
---|---|---|
$node | mixed |
public function removeClass( mixed $class = null ) : void
Parameter | Type(s) | Description |
---|---|---|
$class optional | mixed |
public function save( mixed $filepath = '' ) : void
Parameter | Type(s) | Description |
---|---|---|
$filepath optional | mixed |
protected function seek( mixed $selector, mixed &$ret, mixed $parent_cmd, mixed $lowercase = false ) : void
Parameter | Type(s) | Description |
---|---|---|
$selector | mixed | |
$ret | mixed | |
$parent_cmd | mixed | |
$lowercase optional | mixed |
public function setAttribute( mixed $name, mixed $value ) : void
Parameter | Type(s) | Description |
---|---|---|
$name | mixed | |
$value | mixed |
public function text( mixed $trim = true ) : void
Parameter | Type(s) | Description |
---|---|---|
$trim optional | mixed |
# Inherited methods
This class has not inherited methods.
# Properties
# Inherited properties
This class has not inherited properties.
# simplehtmldom\HtmlWeb
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
# Constants
This class has not constants.
# Methods
public function load( mixed $url ) : \simplehtmldom\HtmlDocument
Parameter | Type(s) | Description |
---|---|---|
$url | mixed |
Returns:
Returns the DOM for a webpage
# Inherited methods
This class has not inherited methods.
# Properties
This class has not properties.
# Inherited properties
This class has not inherited properties.
# simplehtmldom\simple_html_dom
String to get html dom.
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
# Constants
This class has not constants.
# Methods
public function file_get_html( mixed $url, mixed $use_include_path = false, mixed $context = null, mixed $offset = 0, mixed $maxLen = -1, mixed $lowercase = true, mixed $forceTagsClosed = true, mixed $target_charset = \simplehtmldom\DEFAULT_TARGET_CHARSET, mixed $stripRN = true, mixed $defaultBRText = \simplehtmldom\DEFAULT_BR_TEXT, mixed $defaultSpanText = \simplehtmldom\DEFAULT_SPAN_TEXT ) : void
Parameter | Type(s) | Description |
---|---|---|
$url | mixed | |
$use_include_path optional | mixed | |
$context optional | mixed | |
$offset optional | mixed | |
$maxLen optional | mixed | |
$lowercase optional | mixed | |
$forceTagsClosed optional | mixed | |
$target_charset optional | mixed | |
$stripRN optional | mixed | |
$defaultBRText optional | mixed | |
$defaultSpanText optional | mixed |
Parse HTML.
public function str_get_html( string $str, boolean $lowercase = true, boolean $forceTagsClosed = true, string $target_charset = DEFAULT_TARGET_CHARSET, boolean $stripRN = true, string $defaultBRText = DEFAULT_BR_TEXT, string $defaultSpanText = DEFAULT_SPAN_TEXT ) : void
Parameter | Type(s) | Description |
---|---|---|
$str | string | |
$lowercase optional | boolean | |
$forceTagsClosed optional | boolean | |
$target_charset optional | string | |
$stripRN optional | boolean | |
$defaultBRText optional | string | |
$defaultSpanText optional | string |
Parse XML with simplexml_load_string.
public function str_get_xml( string $str, string $class_name = 'SimpleXMLElement', integer $options = 0, string $namespace_or_prefix = '', boolean $is_prefix = false ) : \simplexml_load_string
Parameter | Type(s) | Description |
---|---|---|
$str | string | |
$class_name optional | string | |
$options optional | integer | |
$namespace_or_prefix optional | string | |
$is_prefix optional | boolean |
# Inherited methods
This class has not inherited methods.
# Properties
# Inherited properties
This class has not inherited properties.