PHP Class Ouzo\Utilities\Functions

Show file Open project: letsdrink/ouzo Class Usage Examples

Public Methods

Method Description
append ( $suffix )
call ( $function, $argument )
compose ( $functionA, $functionB ) : callable Returns the composition of two functions.
constant ( $value )
contains ( $element )
endsWith ( $suffix )
equals ( $object )
extract ( null $type = null ) : Ouzo\Utilities\NonCallableExtractor
extractExpression ( $selector, $accessPrivate = false )
extractField ( $name, $accessPrivate = false )
extractFieldRecursively ( $names, $accessPrivate = false )
extractId ( )
formatDateTime ( $format = Date::DEFAULT_TIME_FORMAT )
identity ( )
inArray ( $array )
isArray ( )
isInstanceOf ( $type )
not ( $predicate )
notBlank ( )
notEmpty ( )
notEquals ( $object )
notInArray ( $array )
notNull ( )
prepend ( $prefix )
random ( $min, $max = null )
removePrefix ( $prefix )
startsWith ( $prefix )
surroundWith ( $character )
throwException ( Exception $exception )
toString ( )
trim ( )

Method Details

append() public static method

public static append ( $suffix )

call() public static method

public static call ( $function, $argument )

compose() public static method

composition is defined as the function h such that h(a) == A(B(a)) for each a.
public static compose ( $functionA, $functionB ) : callable
$functionA
$functionB
return callable

constant() public static method

public static constant ( $value )

contains() public static method

public static contains ( $element )

endsWith() public static method

public static endsWith ( $suffix )

equals() public static method

public static equals ( $object )

extract() public static method

public static extract ( null $type = null ) : Ouzo\Utilities\NonCallableExtractor
$type null
return Ouzo\Utilities\NonCallableExtractor

extractExpression() public static method

public static extractExpression ( $selector, $accessPrivate = false )

extractField() public static method

public static extractField ( $name, $accessPrivate = false )

extractFieldRecursively() public static method

public static extractFieldRecursively ( $names, $accessPrivate = false )

extractId() public static method

public static extractId ( )

formatDateTime() public static method

public static formatDateTime ( $format = Date::DEFAULT_TIME_FORMAT )

identity() public static method

public static identity ( )

inArray() public static method

public static inArray ( $array )

isArray() public static method

public static isArray ( )

isInstanceOf() public static method

public static isInstanceOf ( $type )

not() public static method

public static not ( $predicate )

notBlank() public static method

public static notBlank ( )

notEmpty() public static method

public static notEmpty ( )

notEquals() public static method

public static notEquals ( $object )

notInArray() public static method

public static notInArray ( $array )

notNull() public static method

public static notNull ( )

prepend() public static method

public static prepend ( $prefix )

random() public static method

public static random ( $min, $max = null )

removePrefix() public static method

public static removePrefix ( $prefix )

startsWith() public static method

public static startsWith ( $prefix )

surroundWith() public static method

public static surroundWith ( $character )

throwException() public static method

public static throwException ( Exception $exception )
$exception Exception

toString() public static method

public static toString ( )

trim() public static method

public static trim ( )