BenManu\StyleGuide\KSSParser
Synopsis
class KSSParser
extends Parser
{
- // members
- protected boolean $sectionsSortedByReference = false;
- // Inherited members from Parser
- protected array $sections;
- // methods
- protected void addSection()
- public Section getSection()
- public array getSections()
- public array getTopLevelSections()
- public array getSectionChildren()
- protected void sortSections()
- protected void sortSectionsByDepth()
- public static boolean isKssBlock()
- // Inherited methods from Parser
- public void __construct()
- protected void addSection()
- public array getSections()
Hierarchy
Extends
Members
protected
- $sections
—
array
An array of the different comment sections found in the parsed directories. - $sectionsSortedByReference
—
boolean
A flag on whether sections have been sorted
Methods
protected
- addSection() — Adds a section to the Sections collection
- sortSections() — Method to only sort the sections if they need sorting
- sortSectionsByDepth() — Method to sort the sections by depth
public
- getSection() — Returns a Section object matching the requested reference. If reference is not found, an empty Section object is returned instead
- getSectionChildren() — Returns an array of children for a specified section reference
- getSections() — Returns an array of all the sections
- getTopLevelSections() — Returns only the top level sections (i.e. 1.0, 2.0, 3.0, etc.)
- isKssBlock() — Checks to see if a comment block is a KSS Comment block
Inherited from BenManu\StyleGuide\Parser
protected
- addSection() — Adds a section to the Sections collection
public
- getSections() — Returns an array of all the sections