PHP 클래스 Webiny\Component\StdLib\StdObject\StdObjectWrapper

This class is used when we need to return a standard object, but none of the current available standard objects fit the role.
상속: extends AbstractStdObject, use trait Webiny\Component\StdLib\ValidatorTrait
파일 보기 프로젝트 열기: Webiny/Framework 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$value

공개 메소드들

메소드 설명
__construct ( mixed $value ) Constructor.
__toString ( ) : mixed To string implementation.
isArrayObject ( mixed $var ) : boolean Check if $var is an instance of ArrayObject.
isDateTimeObject ( mixed $var ) : boolean Check if $var is an instance of DateTimeObject.
isFileObject ( mixed $var ) : boolean Check if $var is an instance of FileObject.
isStringObject ( mixed $var ) : boolean Check if $var is an instance of StringObject.
isUrlObject ( mixed $var ) : boolean Check if $var is an instance of UrlObject.
returnStdObject ( mixed &$var ) : ArrayObject | StdObjectWrapper | StringObject This function make sure you are returning a standard object.
toArray ( mixed $var ) : array Returns an array based on given $var.
toBool ( mixed $var ) : boolean Returns a bool value based on whatever value passed in.
These values are considered TRUE: '1', 'true', 'on', 'yes', 'y'
toString ( mixed $var ) : string Returns a string based on given $var.

메소드 상세

__construct() 공개 메소드

Set standard object value.
public __construct ( mixed $value )
$value mixed

__toString() 공개 메소드

To string implementation.
public __toString ( ) : mixed
리턴 mixed

isArrayObject() 공개 정적인 메소드

Check if $var is an instance of ArrayObject.
public static isArrayObject ( mixed $var ) : boolean
$var mixed Element to check.
리턴 boolean

isDateTimeObject() 공개 정적인 메소드

Check if $var is an instance of DateTimeObject.
public static isDateTimeObject ( mixed $var ) : boolean
$var mixed Element to check.
리턴 boolean

isFileObject() 공개 정적인 메소드

Check if $var is an instance of FileObject.
public static isFileObject ( mixed $var ) : boolean
$var mixed Element to check.
리턴 boolean

isStringObject() 공개 정적인 메소드

Check if $var is an instance of StringObject.
public static isStringObject ( mixed $var ) : boolean
$var mixed Element to check.
리턴 boolean

isUrlObject() 공개 정적인 메소드

Check if $var is an instance of UrlObject.
public static isUrlObject ( mixed $var ) : boolean
$var mixed Element to check.
리턴 boolean

returnStdObject() 공개 정적인 메소드

This function make sure you are returning a standard object.
public static returnStdObject ( mixed &$var ) : ArrayObject | StdObjectWrapper | StringObject
$var mixed
리턴 Webiny\Component\StdLib\StdObject\ArrayObject\ArrayObject | StdObjectWrapper | StringObject

toArray() 공개 정적인 메소드

This function checks if $var is an array, ArrayObject or something else. This function tries to cast the element to array and return it.
public static toArray ( mixed $var ) : array
$var mixed
리턴 array

toBool() 공개 정적인 메소드

Returns a bool value based on whatever value passed in.
These values are considered TRUE: '1', 'true', 'on', 'yes', 'y'
public static toBool ( mixed $var ) : boolean
$var mixed
리턴 boolean

toString() 공개 정적인 메소드

This function checks if $var is a string, StringObject or something else. In the end a string is returned.
public static toString ( mixed $var ) : string
$var mixed
리턴 string

프로퍼티 상세

$value 보호되어 있는 프로퍼티

protected $value