PHP Trait Webiny\Component\StdLib\StdObjectTrait

Show file Open project: Webiny/Framework

Protected Methods

Method Description
arr ( array $array = null ) : ArrayObject Creates an instance of Array Standard Object.
datetime ( string | integer $time = "now", null | string $timezone = null ) : DateTimeObject Create an instance of DateTime Standard Object.
str ( string $string ) : StringObject Creates an instance of String Standard Object.
url ( string $url ) : UrlObject Creates an instance of Url Standard Object.

Method Details

arr() protected static method

Creates an instance of Array Standard Object.
protected static arr ( array $array = null ) : ArrayObject
$array array
return Webiny\Component\StdLib\StdObject\ArrayObject\ArrayObject

datetime() protected static method

Create an instance of DateTime Standard Object.
protected static datetime ( string | integer $time = "now", null | string $timezone = null ) : DateTimeObject
$time string | integer A date/time string. List of available formats is explained here http://www.php.net/manual/en/datetime.formats.php
$timezone null | string Timezone in which you want to set the date. Here is a list of valid timezones: http://php.net/manual/en/timezones.php
return Webiny\Component\StdLib\StdObject\DateTimeObject\DateTimeObject

str() protected static method

Creates an instance of String Standard Object.
protected static str ( string $string ) : StringObject
$string string
return Webiny\Component\StdLib\StdObject\StringObject\StringObject

url() protected static method

Creates an instance of Url Standard Object.
protected static url ( string $url ) : UrlObject
$url string
return Webiny\Component\StdLib\StdObject\UrlObject\UrlObject