Properties

$value

$value : 

Type

$scheme

$scheme : 

Type

$host

$host : 

Type

$port

$port : 

Type

$path

$path : 

Type

$query

$query : 

Type

Methods

setQuery()

setQuery(\app\framework\Component\StdLib\StdObject\StringObject\StringObject|\app\framework\Component\StdLib\StdObject\ArrayObject\ArrayObject|string|array  $query, boolean  $append = false) : $this

Set url query param.

Parameters

\app\framework\Component\StdLib\StdObject\StringObject\StringObject|\app\framework\Component\StdLib\StdObject\ArrayObject\ArrayObject|string|array $query

Query params.

boolean $append

Do you want to append or overwrite current query param. In case when you are appending values, the values from $query, that already exist in the current query, will be overwritten by the ones inside the $query.

Throws

\app\framework\Component\StdLib\StdObject\UrlObject\UrlObjectException

Returns

$this

val()

val(null|string  $url = null) : mixed

Return, or update, current standard objects value.

Parameters

null|string $url

Returns

mixed

exception()

exception(  $message) 

Throw a standard object exception.

Parameters

$message

Throws

\app\framework\Component\StdLib\StdObject\StdObjectException

isSerialized()

isSerialized(string  $value, mixed  $result = null) : boolean

Checks if a string is serialized using quick string manipulation to throw out obviously incorrect strings. Unserialize is then run on the string to perform the final verification.

Valid serialized forms are the following:

  • boolean: b:1;
  • integer: i:1;
  • double: d:0.2;
  • string: s:4:"test";
  • array: a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}
  • object: O:8:"stdClass":0:{}
  • null: N;

Parameters

string $value

Value to test for serialized form

mixed $result

Result of unserialize() of the $value

Returns

boolean —

True if $value is serialized data, otherwise false

__construct()

__construct(string  $value) 

Constructor.

Set standard object value.

Parameters

string $value

Throws

\app\framework\Component\StdLib\StdObject\UrlObject\UrlObjectException

buildUrl()

buildUrl(\app\framework\Component\StdLib\StdObject\ArrayObject\ArrayObject|array  $parts) : \app\framework\Component\StdLib\StdObject\UrlObject\UrlObject

Build a UrlObject from array parts.

Parameters

\app\framework\Component\StdLib\StdObject\ArrayObject\ArrayObject|array $parts

Url parts, possible keys are: 'scheme', 'host', 'port', 'path' and 'query'

Throws

\app\framework\Component\StdLib\StdObject\UrlObject\UrlObjectException

Returns

\app\framework\Component\StdLib\StdObject\UrlObject\UrlObject

getHost()

getHost() : boolean|string

Get host name, without trailing slash.

Returns

boolean|string —

Host name without the trailing slash.

getScheme()

getScheme() : boolean|string

Get scheme (eg. http).

Returns

boolean|string —

Url scheme, or false if it's not set.

getPort()

getPort() : boolean|integer

Get port number.

Returns

boolean|integer —

Port number, or false if it's not set.

getQuery()

getQuery() : array

Get query params as an array from current object.

Returns

array —

Array containing query params from the current instance.

getDomain()

getDomain() : string|boolean

Get the domain name of the current url.

Returns

string|boolean —

Domain name, or false it's not set.

getPath()

getPath(boolean  $asStringObject = false) : string|\app\framework\Component\StdLib\StdObject\StringObject\StringObject

Get the path from the current url.

Parameters

boolean $asStringObject

Return instance of StringObject

Returns

string|\app\framework\Component\StdLib\StdObject\StringObject\StringObject

Path from the current instance.

__toString()

__toString() : string

To string implementation.

Returns

string

datetime()

datetime(string|integer  $time = "now", null|string  $timezone = null) : \app\framework\Component\StdLib\StdObject\DateTimeObject\DateTimeObject

Create an instance of DateTime Standard Object.

Parameters

string|integer $time

A date/time string. List of available formats is explained here http://www.php.net/manual/en/datetime.formats.php

null|string $timezone

Timezone in which you want to set the date. Here is a list of valid timezones: http://php.net/manual/en/timezones.php

Returns

\app\framework\Component\StdLib\StdObject\DateTimeObject\DateTimeObject

getObject()

getObject() : $this

Returns an Instance of current Object

Returns

$this

is()

is(  $var) 

Parameters

$var

isNull()

isNull(mixed  $var) : boolean

Checks if given value is null.

Parameters

mixed $var

Value to check

Returns

boolean

isEmpty()

isEmpty(mixed  $var) : boolean

Checks if given value is empty.

Parameters

mixed $var

Value to check

Returns

boolean

isObject()

isObject(mixed  $var) : boolean

Check if given value is an object.

Parameters

mixed $var

Value to check

Returns

boolean

isScalar()

isScalar(mixed  $var) : boolean

Check if given value is a scalar value.

Scalar values are: integer, float, boolean and string

Parameters

mixed $var

Value to check

Returns

boolean

isResource()

isResource(mixed  $var) : boolean

Check if given value is a resource.

Parameters

mixed $var

Value to check

Returns

boolean

isArray()

isArray(  $var) : boolean

Checks if given value is an array.

Parameters

$var

Returns

boolean

isNumber()

isNumber(  $var) : boolean

Checks if value is a number.

Parameters

$var

Returns

boolean

isInteger()

isInteger(  $var) : boolean

Checks if value is an integer.

Parameters

$var

Returns

boolean

isCallable()

isCallable(  $var) : boolean

Checks whenever resource is callable.

Parameters

$var

Returns

boolean

isString()

isString(  $var) : boolean

Checks if $var is type of string.

Parameters

$var

Returns

boolean

isBool()

isBool(  $var) : boolean

Checks if $var is type of boolean.

Parameters

$var

Returns

boolean

isBoolean()

isBoolean(  $var) : boolean

This is an alias function for self::isBool

Parameters

$var

Returns

boolean

isFile()

isFile(  $var) : boolean

Checks if $var is a file.

Parameters

$var

Returns

boolean

isReadable()

isReadable(  $var) : boolean

Checks if $var is readable.

Parameters

$var

Returns

boolean

isDirectory()

isDirectory(  $var) : boolean

Checks if $var is a directory.

Parameters

$var

Returns

boolean

isInstanceOf()

isInstanceOf(mixed  $instance, string  $type) : boolean

Check if $instance is of $type.

Parameters

mixed $instance
string $type

Returns

boolean

isSubClassOf()

isSubClassOf(string|object  $subclass, string  $class) : boolean

Check if $subclass is a subclass of $class.

Parameters

string|object $subclass
string $class

Returns

boolean

isStringObject()

isStringObject(mixed  $instance) : boolean

Check if $instance is a StringObject.

Parameters

mixed $instance

Returns

boolean

isDateTimeObject()

isDateTimeObject(mixed  $instance) : boolean

Check if $instance is a DateTimeObject.

Parameters

mixed $instance

Returns

boolean

isFileObject()

isFileObject(mixed  $instance) : boolean

Check if $instance is a FileObject.

Parameters

mixed $instance

Returns

boolean

isArrayObject()

isArrayObject(mixed  $instance) : boolean

Check if $instance is an ArrayObject.

Parameters

mixed $instance

Returns

boolean

isUrlObject()

isUrlObject(mixed  $instance) : boolean

Check if $instance is a UrlObject.

Parameters

mixed $instance

Returns

boolean

rebuildUrl()

rebuildUrl() : $this

Builds url from current url elements.

Returns

$this

validateUrl()

validateUrl() 

Validates current url and parses data like scheme, host, query, and similar from, it.

Throws

\app\framework\Component\StdLib\StdObject\UrlObject\UrlObjectException

getHeaderResponseString()

getHeaderResponseString(integer  $headerCode) : string

Get a string for the given header response code.

Parameters

integer $headerCode

Header code.

Throws

\app\framework\Component\StdLib\StdObject\UrlObject\UrlObjectException

Returns

string