tp TouchPointWP Utilities NotableAttributes - TenthPres/TouchPoint-WP GitHub Wiki
tp\TouchPointWP\Utilities\NotableAttributes
A collection of things that can be cast to a string by gluing them together with a simple implode().
- Class name: NotableAttributes
- Namespace: \tp\TouchPointWP\Utilities
- Parent class: tp\TouchPointWP\Utilities\StringableArray
Methods
__construct
mixed tp\TouchPointWP\Utilities\StringableArray::__construct(object|array array, int flags, string iteratorClass)
StringableArray constructor.
- Visibility: public
- This method is defined by tp\TouchPointWP\Utilities\StringableArray
Arguments
- array object|array* flags int* iteratorClass string
Returns
- mixed
count
int tp\TouchPointWP\Utilities\StringableArray::count()
Length of array.
- Visibility: public
- This method is defined by tp\TouchPointWP\Utilities\StringableArray
Returns
- int -
prepend
mixed tp\TouchPointWP\Utilities\StringableArray::prepend(mixed value, null key)
Append to the start of the array.
- Visibility: public
- This method is defined by tp\TouchPointWP\Utilities\StringableArray
Arguments
- value mixed* key null
Returns
- mixed
toArray
array tp\TouchPointWP\Utilities\StringableArray::toArray()
Get the stringable array, as an array.
- Visibility: public
- This method is defined by tp\TouchPointWP\Utilities\StringableArray
Returns
- array -
contains
bool tp\TouchPointWP\Utilities\StringableArray::contains(mixed needle)
Determine if the stringable array (haystack) contains the given needle
- Visibility: public
- This method is defined by tp\TouchPointWP\Utilities\StringableArray
Arguments
- needle mixed
Returns
- bool -
keys
array tp\TouchPointWP\Utilities\StringableArray::keys()
Get the keys of the array.
- Visibility: public
- This method is defined by tp\TouchPointWP\Utilities\StringableArray
Returns
- array -
__toString
string tp\TouchPointWP\Utilities\StringableArray::__toString()
Standard method to stringify.
- Visibility: public
- This method is defined by tp\TouchPointWP\Utilities\StringableArray
Returns
- string -
join
string tp\TouchPointWP\Utilities\StringableArray::join(string|null separator, string|null prefix, string|null postfix)
Link the items together with a given separator, which may be different from the separator used in the constructor.
- Visibility: public
- This method is defined by tp\TouchPointWP\Utilities\StringableArray
Arguments
- separator string|null* prefix string|null* postfix string|null
Returns
- string -
toListString
string tp\TouchPointWP\Utilities\StringableArray::toListString(int limit, bool andOthers)
Convert the array to a list string with ampersands and such.
- Visibility: public
- This method is defined by tp\TouchPointWP\Utilities\StringableArray
Arguments
- limit int* andOthers bool
Returns
- string -