PHP Class JBZoo\SimpleTypes\Type\Type

Datei anzeigen Open project: jbzoo/simpletypes

Protected Properties

Property 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

Public Methods

Method 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

Protected Methods

Method 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 method

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

__clone() public method

Clone object
public __clone ( )

__construct() public method

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

__get() public method

public __get ( string $name ) : float | string
$name string
return float | string

__invoke() public method

public __invoke ( )

__set() public method

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

__sleep() public method

Serialize
public __sleep ( ) : array
return array

__toString() public method

public __toString ( ) : string
return string

__wakeup() public method

Wake up after serialize
public __wakeup ( )

_customAdd() protected method

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

_customConvert() protected method

protected _customConvert ( string $rule, boolean $addToLog = false ) : float
$rule string
$addToLog boolean
return float

_getConfig() protected method

protected _getConfig ( Config $config = null ) : Config
$config JBZoo\SimpleTypes\Config\Config
return JBZoo\SimpleTypes\Config\Config

_modifer() protected method

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

abs() public method

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

add() public method

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

addRule() public method

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

changeRule() public method

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

compare() public method

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

convert() public method

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

customFunc() public method

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

data() public method

public data ( boolean $toString = false ) : array
$toString boolean
return array

division() public method

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

dump() public method

public dump ( boolean $showId = true ) : string
$showId boolean
return string

error() public method

public error ( string $message )
$message string

getClone() public method

public getClone ( )

getId() public method

public getId ( ) : integer
return integer

getRule() public method

public getRule ( ) : string
return string

getRuleData() public method

public getRuleData ( string $rule ) : array
$rule string
return array

getRules() public method

public getRules ( ) : array
return array

getValidValue() public method

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

html() public method

public html ( $rule = null ) : string
$rule
return string

htmlInput() public method

public htmlInput ( null $rule = null, null $name = null, boolean $formatted = false ) : string
$rule null
$name null
$formatted boolean
return string

invert() public method

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

isEmpty() public method

public isEmpty ( ) : boolean
return boolean

isNegative() public method

public isNegative ( ) : boolean
return boolean

isPositive() public method

public isPositive ( ) : boolean
return boolean

isRule() public method

public isRule ( string $rule ) : boolean
$rule string
return boolean

log() public method

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

logs() public method

public logs ( ) : mixed
return mixed

multiply() public method

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

negative() public method

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

noStyle() public method

public noStyle ( $rule = null ) : string
$rule
return string

percent() public method

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

positive() public method

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

removeRule() public method

public removeRule ( string $rule )
$rule string

round() public method

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

set() public method

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

setEmpty() public method

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

subtract() public method

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

text() public method

public text ( $rule = null ) : string
$rule
return string

val() public method

public val ( string $rule = null ) : float
$rule string
return float

Property Details

$_counter protected_oe static_oe property

protected static $_counter

$_default protected_oe property

protected string $_default
return string

$_formatter protected_oe property

protected Formatter,JBZoo\SimpleTypes $_formatter
return JBZoo\SimpleTypes\Formatter

$_isDebug protected_oe property

protected bool $_isDebug
return boolean

$_logs protected_oe property

protected array $_logs
return array

$_parser protected_oe property

protected Parser,JBZoo\SimpleTypes $_parser
return JBZoo\SimpleTypes\Parser

$_rule protected_oe property

protected string $_rule
return string

$_type protected_oe property

protected string $_type
return string

$_uniqueId protected_oe property

protected int $_uniqueId
return integer

$_value protected_oe property

protected float|int $_value
return float | integer