/ LJCPHPCodeDoc / LJCGenTextSectionLib / LJCDirective


Syntax

PHP
class LJCDirective

Represents a template Directive.

Remarks

Template Directives are include in a valid comment line for whatever text type or language is being generated. A line which contains a Directive will not appear in the generated text.

The valid Directives are:

<!-- #SectionBegin Name -->
Indicates the beginning of a Section. The Directive includes the Section name. The Section name is used in the XMLData to indicate to which Section the Items and Replacements apply.

<!-- #SectionEnd Name -->
Indicates the end of a Section. The section name is optional and simply helps to identify what section is ending.

<!-- #Value _ReplacementValue_ -->
A value Directive is currently informational only. It identifies a Replacement value that appears in Items within that Section.

<!-- #IfBegin _ReplacementValue_ ComparisonValue -->
This Directive indicates the beginning of conditional text. If the _ReplacementValue_ is equal to the ComparisonValue, then the next text lines are generated up to the #IfElse or #IfEnd directive.
The ComparisonValue can be "NotNull". The #IfBegin will be true if the _ReplacementValue_ is not null.

<!-- #IfElse -->
The next text lines are generated up to the #IfEnd Directive if the #IfBegin Directive was false.

<!-- #IfEnd _ReplacementValue_ comparisonValue -->
The end of the #IfBegin text. The _ReplacementValue_ and ComparisonValue are optional and help to identify which #IfBegin is ending.


Public Functions
Find Find any Directives in a line.
construct Initializes an object instance.
2 Functions

Public Properties
$Name The Directive Name.
$Type The Directive Type.
$Value The compare value.

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.