\MslsBlog

Internal representation of a blog

Summary

Methods
Properties
Constants
__construct()
__get()
get_description()
get_language()
get_alpha2()
_cmp()
language()
description()
$userblog_id
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$obj
$language
$description
N/A

Properties

$userblog_id

$userblog_id : int

Type

int

$obj

$obj : \StdClass

WordPress generates such an object

Type

\StdClass

$language

$language : string

Language-code eg. de_DE

Type

string

$description

$description : string

Description eg. Deutsch

Type

string

Methods

__construct()

__construct(\StdClass $obj, string $description)

Constructor

Parameters

\StdClass $obj
string $description

__get()

__get(string $key) : mixed|null

Get a member of the StdClass-object by name

The method return null if the requested member does not exists.

Parameters

string $key

Returns

mixed|null

get_description()

get_description() : string

Get the description stored in this object

The method returns the stored language if the description is empty.

Returns

string

get_language()

get_language() : string

Get the language stored in this object

This method returns the string 'us' if there is an empty value in language.

Returns

string

get_alpha2()

get_alpha2() : string

Get the alpha2-part of the language-code

This method returns the string 'en' if the language-code contains just 'us'.

Returns

string

_cmp()

_cmp(string $a, string $b)

Sort objects helper

Parameters

string $a
string $b

return int

language()

language(\MslsBlog $a, \MslsBlog $b)

Sort objects by language

Parameters

\MslsBlog $a
\MslsBlog $b

return int

description()

description(\MslsBlog $a, \MslsBlog $b)

Sort objects by description

Parameters

\MslsBlog $a
\MslsBlog $b

return int