PHP Class JBZoo\SimpleTypes\Type\Type

Afficher le fichier Open project: jbzoo/simpletypes

Protected Properties

Свойство Type Description
$_counter
$_default string
$_formatter JBZoo\SimpleTypes\Formatter
$_isDebug boolean
$_logs array
$_parser JBZoo\SimpleTypes\Parser
$_rule string
$_type string
$_uniqueId integer
$_value float | integer

Méthodes publiques

Méthode Description
__call ( string $name, array $arguments ) Experimental! Methods aliases
__clone ( ) Clone object
__construct ( string $value = null, Config $config = null )
__get ( string $name ) : float | string
__invoke ( )
__set ( string $name, mixed $value )
__sleep ( ) : array Serialize
__toString ( ) : string
__wakeup ( ) Wake up after serialize
abs ( boolean $getClone = false )
add ( mixed $value, boolean $getClone = false )
addRule ( string $rule, array $newFormat = [] )
changeRule ( string $rule, array $newFormat )
compare ( mixed $value, string $mode = '==', integer $round = Formatter::ROUND_DEFAULT ) : boolean
convert ( string $newRule, boolean $getClone = false )
customFunc ( Closure $function, boolean $getClone = false )
data ( boolean $toString = false ) : array
division ( float $number, boolean $getClone = false )
dump ( boolean $showId = true ) : string
error ( string $message )
getClone ( )
getId ( ) : integer
getRule ( ) : string
getRuleData ( string $rule ) : array
getRules ( ) : array
getValidValue ( Type | string $value )
html ( $rule = null ) : string
htmlInput ( null $rule = null, null $name = null, boolean $formatted = false ) : string
invert ( boolean $getClone = false )
isEmpty ( ) : boolean
isNegative ( ) : boolean
isPositive ( ) : boolean
isRule ( string $rule ) : boolean
log ( string $message )
logs ( ) : mixed
multiply ( float $number, boolean $getClone = false )
negative ( boolean $getClone = false )
noStyle ( $rule = null ) : string
percent ( $value, $revert = false )
positive ( boolean $getClone = false )
removeRule ( string $rule )
round ( integer $roundValue = null, string $mode = Formatter::ROUND_CLASSIC )
set ( mixed $value, boolean $getClone = false )
setEmpty ( boolean $getClone = false )
subtract ( mixed $value, boolean $getClone = false )
text ( $rule = null ) : string
val ( string $rule = null ) : float

Méthodes protégées

Méthode Description
_customAdd ( mixed $value, boolean $getClone = false, boolean $isSubtract = false )
_customConvert ( string $rule, boolean $addToLog = false ) : float
_getConfig ( Config $config = null ) : Config
_modifer ( mixed $newValue, string $logMessage = null, boolean $getClone = false )

Method Details

__call() public méthode

Experimental! Methods aliases
public __call ( string $name, array $arguments )
$name string
$arguments array

__clone() public méthode

Clone object
public __clone ( )

__construct() public méthode

public __construct ( string $value = null, Config $config = null )
$value string
$config JBZoo\SimpleTypes\Config\Config

__get() public méthode

public __get ( string $name ) : float | string
$name string
Résultat float | string

__invoke() public méthode

public __invoke ( )

__set() public méthode

public __set ( string $name, mixed $value )
$name string
$value mixed

__sleep() public méthode

Serialize
public __sleep ( ) : array
Résultat array

__toString() public méthode

public __toString ( ) : string
Résultat string

__wakeup() public méthode

Wake up after serialize
public __wakeup ( )

_customAdd() protected méthode

protected _customAdd ( mixed $value, boolean $getClone = false, boolean $isSubtract = false )
$value mixed
$getClone boolean
$isSubtract boolean

_customConvert() protected méthode

protected _customConvert ( string $rule, boolean $addToLog = false ) : float
$rule string
$addToLog boolean
Résultat float

_getConfig() protected méthode

protected _getConfig ( Config $config = null ) : Config
$config JBZoo\SimpleTypes\Config\Config
Résultat JBZoo\SimpleTypes\Config\Config

_modifer() protected méthode

protected _modifer ( mixed $newValue, string $logMessage = null, boolean $getClone = false )
$newValue mixed
$logMessage string
$getClone boolean

abs() public méthode

public abs ( boolean $getClone = false )
$getClone boolean

add() public méthode

public add ( mixed $value, boolean $getClone = false )
$value mixed
$getClone boolean

addRule() public méthode

public addRule ( string $rule, array $newFormat = [] )
$rule string
$newFormat array

changeRule() public méthode

public changeRule ( string $rule, array $newFormat )
$rule string
$newFormat array

compare() public méthode

public compare ( mixed $value, string $mode = '==', integer $round = Formatter::ROUND_DEFAULT ) : boolean
$value mixed
$mode string
$round integer
Résultat boolean

convert() public méthode

public convert ( string $newRule, boolean $getClone = false )
$newRule string
$getClone boolean

customFunc() public méthode

public customFunc ( Closure $function, boolean $getClone = false )
$function Closure
$getClone boolean

data() public méthode

public data ( boolean $toString = false ) : array
$toString boolean
Résultat array

division() public méthode

public division ( float $number, boolean $getClone = false )
$number float
$getClone boolean

dump() public méthode

public dump ( boolean $showId = true ) : string
$showId boolean
Résultat string

error() public méthode

public error ( string $message )
$message string

getClone() public méthode

public getClone ( )

getId() public méthode

public getId ( ) : integer
Résultat integer

getRule() public méthode

public getRule ( ) : string
Résultat string

getRuleData() public méthode

public getRuleData ( string $rule ) : array
$rule string
Résultat array

getRules() public méthode

public getRules ( ) : array
Résultat array

getValidValue() public méthode

public getValidValue ( Type | string $value )
$value Type | string

html() public méthode

public html ( $rule = null ) : string
$rule
Résultat string

htmlInput() public méthode

public htmlInput ( null $rule = null, null $name = null, boolean $formatted = false ) : string
$rule null
$name null
$formatted boolean
Résultat string

invert() public méthode

public invert ( boolean $getClone = false )
$getClone boolean

isEmpty() public méthode

public isEmpty ( ) : boolean
Résultat boolean

isNegative() public méthode

public isNegative ( ) : boolean
Résultat boolean

isPositive() public méthode

public isPositive ( ) : boolean
Résultat boolean

isRule() public méthode

public isRule ( string $rule ) : boolean
$rule string
Résultat boolean

log() public méthode

public log ( string $message )
$message string Som message for debugging

logs() public méthode

public logs ( ) : mixed
Résultat mixed

multiply() public méthode

public multiply ( float $number, boolean $getClone = false )
$number float
$getClone boolean

negative() public méthode

public negative ( boolean $getClone = false )
$getClone boolean

noStyle() public méthode

public noStyle ( $rule = null ) : string
$rule
Résultat string

percent() public méthode

public percent ( $value, $revert = false )
$value
$revert

positive() public méthode

public positive ( boolean $getClone = false )
$getClone boolean

removeRule() public méthode

public removeRule ( string $rule )
$rule string

round() public méthode

public round ( integer $roundValue = null, string $mode = Formatter::ROUND_CLASSIC )
$roundValue integer
$mode string

set() public méthode

public set ( mixed $value, boolean $getClone = false )
$value mixed
$getClone boolean

setEmpty() public méthode

public setEmpty ( boolean $getClone = false )
$getClone boolean

subtract() public méthode

public subtract ( mixed $value, boolean $getClone = false )
$value mixed
$getClone boolean

text() public méthode

public text ( $rule = null ) : string
$rule
Résultat string

val() public méthode

public val ( string $rule = null ) : float
$rule string
Résultat float

Property Details

$_counter protected_oe static_oe property

protected static $_counter

$_default protected_oe property

protected string $_default
Résultat string

$_formatter protected_oe property

protected Formatter,JBZoo\SimpleTypes $_formatter
Résultat JBZoo\SimpleTypes\Formatter

$_isDebug protected_oe property

protected bool $_isDebug
Résultat boolean

$_logs protected_oe property

protected array $_logs
Résultat array

$_parser protected_oe property

protected Parser,JBZoo\SimpleTypes $_parser
Résultat JBZoo\SimpleTypes\Parser

$_rule protected_oe property

protected string $_rule
Résultat string

$_type protected_oe property

protected string $_type
Résultat string

$_uniqueId protected_oe property

protected int $_uniqueId
Résultat integer

$_value protected_oe property

protected float|int $_value
Résultat float | integer