PHP Class rock\sanitize\Sanitize

Inheritance: implements rock\base\ObjectInterface, use trait rock\base\ObjectTrait
Exibir arquivo Open project: romeoz/rock-sanitize Class Usage Examples

Protected Properties

Property Type Description
$rawRules rock\sanitize\rules\Rule[] List raw rules.
$recursive boolean Enable recursive mode.
$remainder string Label remainder.
$rules array List rules.

Public Methods

Method Description
__call ( $name, $arguments )
__callStatic ( $name, $arguments )
existsRule ( string $name ) : boolean Exists rule.
getRawRules ( ) : Rule[]
init ( )
parentCall ( )
sanitize ( mixed $input ) : mixed Sanitize value.
setRecursive ( boolean $enable ) Enable recursive mode.
setRemainder ( string $label ) Sets a label remainder.
setRules ( array $rules ) Sets a list rules.

Protected Methods

Method Description
attributesInternal ( $attributes )
defaultRules ( )
getInstance ( ) : static Returns instance.
getInstanceRule ( string $name, array $arguments ) : Rule Returns instance rule.
recursiveInternal ( $enable = true )
rulesInternal ( array $rules )

Method Details

__call() public method

public __call ( $name, $arguments )

__callStatic() public static method

public static __callStatic ( $name, $arguments )

attributesInternal() protected method

protected attributesInternal ( $attributes )

defaultRules() protected method

protected defaultRules ( )

existsRule() public method

Exists rule.
public existsRule ( string $name ) : boolean
$name string name of rule.
return boolean

getInstance() protected static method

If exists {@see \rock\di\Container} that uses it.
protected static getInstance ( ) : static
return static

getInstanceRule() protected method

Returns instance rule.
protected getInstanceRule ( string $name, array $arguments ) : Rule
$name string name of rule
$arguments array
return rock\sanitize\rules\Rule

getRawRules() public method

public getRawRules ( ) : Rule[]
return rock\sanitize\rules\Rule[]

init() public method

public init ( )

parentCall() public method

public parentCall ( )

recursiveInternal() protected method

protected recursiveInternal ( $enable = true )

rulesInternal() protected method

protected rulesInternal ( array $rules )
$rules array

sanitize() public method

Sanitize value.
public sanitize ( mixed $input ) : mixed
$input mixed
return mixed

setRecursive() public method

Enable recursive mode.
public setRecursive ( boolean $enable )
$enable boolean

setRemainder() public method

Sets a label remainder.
public setRemainder ( string $label )
$label string

setRules() public method

Sets a list rules.
public setRules ( array $rules )
$rules array

Property Details

$rawRules protected_oe property

List raw rules.
protected Rule[],rock\sanitize\rules $rawRules
return rock\sanitize\rules\Rule[]

$recursive protected_oe property

Enable recursive mode.
protected bool $recursive
return boolean

$remainder protected_oe property

Label remainder.
protected string $remainder
return string

$rules protected_oe property

List rules.
protected array $rules
return array