\Input

Copyright (c) 2013, dsphinx@plug.gr All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by the dsphinx@plug.gr.
  4. Neither the name of the dsphinx@plug.gr nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY dsphinx@plug.gr ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL dsphinx@plug.gr BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Summary

Methods
Properties
Constants
__construct()
dump()
objectToArray()
offsetGet()
filter()
_xss()
offsetExists()
offsetSet()
offsetUnset()
__invoke()
count()
In()
In_POST_GET()
In_SESSION()
In_COOKIE()
In_GET_Url()
safe()
_int()
positive()
number_decimal()
safe_sql()
web()
answer_word()
answer()
session_input()
cookie_input()
number()
allow_XSS_strings()
validateDate()
$__vars
$__filter
$__always
No constants found
No protected methods found
$__title
N/A
No private methods found
No private properties found
N/A

Properties

$__vars

$__vars : 

Type

$__filter

$__filter : 

Type

$__always

$__always : 

Type

$__title

$__title : 

Type

Methods

__construct()

__construct(  $_INPUT,   $title) 

Initialize object from

Parameters

$_INPUT
$title

dump()

dump(  $object = NULL,   $return_data = FALSE) 

Fancy Output

Parameters

$object
$return_data

objectToArray()

objectToArray(  $d) 

Object to Array

Parameters

$d

offsetGet()

offsetGet(  $varname) 

Array[name] access.

Parameters

$varname

filter()

filter(  $data) 

Filter Input

Parameters

$data

_xss()

_xss(  $data) 

Prevent from XSS attack

Parameters

$data

offsetExists()

offsetExists(  $name) 

Needed for commonplace isset($_POST["var"]) checks.

Parameters

$name

offsetSet()

offsetSet(  $name,   $value) 

Stubs to satisfy arrayaccess interface.

Parameters

$name
$value

offsetUnset()

offsetUnset(  $name) 

Parameters

$name

__invoke()

__invoke() 

Allows testing variable presence with e.g. if ( $_POST() )

count()

count() 

Countable

In()

In(  $data) : \$_POST[$name]

Parameters

$data

Returns

\$_POST[$name] —

or $_GET[$name] or $_SESSION[$name]

In_POST_GET()

In_POST_GET(  $name) : \$_POST[$name]

Parameters

$name

Returns

\$_POST[$name] —

or $_GET[$name]

In_SESSION()

In_SESSION(  $name) 

Parameters

$name

In_COOKIE()

In_COOKIE(  $name) 

Parameters

$name

In_GET_Url()

In_GET_Url(  $name) : null|string

Parameters

$name

$_GET a param , safe way

Returns

null|string

safe()

safe(  $data,   $encoding = 'UTF-8') 

Parameters

$data
$encoding

_int()

_int(  $data) 

Integer

Parameters

$data

positive()

positive(  $name) 

Parameters

$name

number_decimal()

number_decimal(  $value,   $number = NULL) 

Parameters

$value
$number

safe_sql()

safe_sql(  $data,   $link_mysli = NULL) 

Parameters

$data
$link_mysli

web()

web(  $data) 

Parameters

$data

answer_word()

answer_word(  $data) 

Parameters

$data

answer()

answer(  $name,   $number = NULL,   $is_SQL_query = FALSE) 

Parameters

$name
$number
$is_SQL_query

session_input()

session_input(  $name) 

Parameters

$name

cookie_input()

cookie_input(  $name) 

Parameters

$name

number()

number(  $name) 

Parameters

$name

allow_XSS_strings()

allow_XSS_strings(  $var) 

Parameters

$var

validateDate()

validateDate(  $date, string  $format = 'Y-m-d') : boolean

Parameters

$date
string $format

Returns

boolean —

return valid date