ClassNameIndex
class ClassNameIndex (View source)
A filterable index of class names
Properties
protected array | $classNames | Indexed array by class name |
Methods
Constructor. Note: If you pass a data array here, make sure to key sort it before!
Set the data of this index to the given class names. Note: Make sure to sort the array before!
Returns the class names contained in this index
Checks, if a class name is contained in this index
Returns a new index object with all class names contained in this and the given index
Sets this index to all class names which are present currently and contained in the given index
Returns a new index object containing all class names of this index and the given one
Sets this index to all class names which are either already present or are contained in the given index
No description
No description
Returns a new index object which contains all class names of this index starting with the given prefix
Details
__construct(array $classNames = [])
Constructor. Note: If you pass a data array here, make sure to key sort it before!
void
setClassNames(array $classNames)
Set the data of this index to the given class names. Note: Make sure to sort the array before!
array
getClassNames()
Returns the class names contained in this index
bool
hasClassName(string $className)
Checks, if a class name is contained in this index
ClassNameIndex
intersect(ClassNameIndex $classNameIndex)
Returns a new index object with all class names contained in this and the given index
void
applyIntersect(ClassNameIndex $classNameIndex)
Sets this index to all class names which are present currently and contained in the given index
ClassNameIndex
union(ClassNameIndex $classNameIndex)
Returns a new index object containing all class names of this index and the given one
void
applyUnion(ClassNameIndex $classNameIndex)
Sets this index to all class names which are either already present or are contained in the given index
void
sort()
No description
int
count()
No description
ClassNameIndex
filterByPrefix(string $prefixFilter)
Returns a new index object which contains all class names of this index starting with the given prefix