\Fluent_Demo_Template

Fluent_Demo_Template.

Summary

Methods
Properties
Constants
getInstance()
__get()
__set()
__isset()
$version
$domain
$url
$args
No constants found
parse_args()
provide()
random_string()
guid()
No protected properties found
N/A
default_args()
$instance
$_args
N/A

Properties

$version

$version : string

Type

string — Class version.

$domain

$domain : string

Type

string — Class text domain.

$url

$url : string

Type

string — fluent url.

$args

$args : array

Type

array — Class args to be run attached after <code>parse_args</code>.

$instance

$instance : object

Type

object — holds and instance of the class so we always get the right one.

$_args

$_args : array

Type

array — holds the data passed to the class.

Methods

getInstance()

getInstance() : \$instance

Function used to get the class instance

Returns

\$instance

__get()

__get( $key) : mixed

Used to access variables in the class.

Parameters

$key

Returns

mixed

__set()

__set( $key,  $value) : mixed

Used to set variables in the class.

Parameters

$key
$value

Returns

mixed

__isset()

__isset( $key) : boolean

Magic method for testing isset again properties.

Parameters

$key

Returns

boolean

parse_args()

parse_args(array $a, array $b, string $filter) : array

Recursive array merging from a default and supplied array.

Very similar function to wp_parse_args except it filters through the whole array tree.

Parameters

array $a

supplied value array.

array $b

default value array.

string $filter

optionally run the array through apply_filters before returning.

Returns

array

provide()

provide(string $key) : array

The provide function is just a shorthand wrapper for suppling a class object and method as array in WordPress actions and filters.

Parameters

string $key

the method name to be added to the array: array( &$this, $key ).

Returns

array

random_string()

random_string(string $length) : string

Helper function used inside the <code>guid()</code> function to generate random strings.

Parameters

string $length

the number of characters to return.

Returns

string

guid()

guid() : string

Guid function used to reformat array index values before sedning them to the fields.

Simply replicates the behaviour found in framework javascript.

Returns

string

default_args()

default_args() : array

Function used across extended classes used in conjunction with <code>parse_args</code> to format supplied arrays and ensure all keys are supplied.

Returns

array