Package DE_EPAGES::Core::API::Object::ConfStructure
configuration structures are objects to simulate configuration files.
Functions
- addSection
- addSectionComment
- addSectionKey
- existsSection
- existsSectionComment
- existsSectionKey
- exportConf
- getConfType
- getSectionCommentInfo
- getSectionCommentLastAppearence
- getSectionCommentPosition
- getSectionComments
- getSectionCommentsIDs
- getSectionCommentsMaxPosition
- getSectionKeyCommentsMaxPosition
- getSectionKeyPosition
- getSectionKeyValue
- getSectionKeys
- getSectionPosition
- getSections
- getSectionsMaxPosition
- importConfStructure
- new
- removeSection
- removeSectionKey
- setSectionKeyValue
addSection
add section to structure
Syntax |
$ConfStruct->addSection($Section,$Position); |
Input |
|
addSectionComment
add section key to structure
Syntax |
$ConfStruct->addSectionComment($Section,$Comment,$Position); |
Input |
|
addSectionKey
add section key to structure
Syntax |
$ConfStruct->addSectionKey($Section, $Key, $Position); |
Input |
|
existsSection
return true if the section exists
Syntax |
my $ExistsSection = $ConfStruct->existsSection($Section); |
Input |
|
Return |
|
existsSectionComment
return true if the section key exists
Syntax |
my $ExistsSectionComment = $ConfStruct->existsSectionComment($Section); |
Input |
|
Return |
|
existsSectionKey
return true if the section key exists
Syntax |
my $ExistsSectionKey = $ConfStruct->existsSectionKey($Section,$Key); |
Input |
|
Return |
|
exportConf
exports the structure into config file
Syntax |
$ConfStruct->exportConf($FileName); |
Input |
|
getConfType
returns the type of conf [epages|standard]
Syntax |
my $ConfType = $self->getConfType(); |
Return |
|
getSectionCommentInfo
returns infos about section comments, all sections listed with related position
Syntax |
$SectionCommentInfos = $ConfStruct->getSectionCommentInfo($Section); |
Input |
|
Return |
|
getSectionCommentLastAppearence
get last appearence of section comment, maybe there are multiple comments in section that are identical
Syntax |
my $LastAppearence = $ConfStruct->getSectionCommentLastAppearence($Section,$Comment); |
Input |
|
Return |
|
getSectionCommentPosition
return the section comment position
Syntax |
my $Position = $ConfStruct->getSectionCommentPosition($Section,$CommentID); |
Input |
|
Return |
|
getSectionComments
get list with section comments
Syntax |
my $aSectionComments = $ConfStruct->getSectionComments($Section); |
Input |
|
Return |
|
getSectionCommentsIDs
get list with section comments identifier
Syntax |
my $aCommentsIDs = $ConfStruct->getSectionCommentsIDs($Section); |
Input |
|
Return |
|
getSectionCommentsMaxPosition
get max position of section keys
Syntax |
$ConfStruct->getSectionCommentsMaxPosition($Section); |
Input |
|
Return |
|
getSectionKeyCommentsMaxPosition
get max position of section keys
Syntax |
$ConfStruct->getSectionKeyCommentsMaxPosition($Section); |
Input |
|
Return |
|
getSectionKeyPosition
return the section key position
Syntax |
my $Position = $ConfStruct->getSectionKeyPosition($Section,$Key); |
Input |
|
Return |
|
getSectionKeyValue
return the section key value
Syntax |
my $Value = $ConfStruct->getSectionKeyValue($Section,$Key); |
Input |
|
Return |
|
getSectionKeys
return a list with the lines of section
Syntax |
$aSectionKeys = $ConfStruct->getSectionKeys($Section); |
Input |
|
Return |
|
getSectionPosition
return the section position
Syntax |
my $Position = $ConfStruct->getSectionPosition($Section); |
Input |
|
Return |
|
getSections
return a list with the names of all sections in the configuration structure.
Syntax |
$aSections = $ConfStruct->getSections(); |
Example |
my @Sections = @{$ConfStruct->getSections()}; |
Return |
|
getSectionsMaxPosition
get max position of section keys
Syntax |
$ConfStruct->getSectionsMaxPosition(); |
Return |
|
importConfStructure
imports all sections and comments from given config structure
Syntax |
$ConfStruct->importConfStructure($ImportConfStruct); |
Input |
|
new
constructor for config structure object.
Syntax |
$self->new($ConfType); |
Input |
|
Return |
|
removeSection
remove section from structure
Syntax |
$ConfStruct->removeSection($Section); |
Input |
|
removeSectionKey
remove the section key
Syntax |
$ConfStruct->removeSectionKey($Section,$Key); |
Input |
|
setSectionKeyValue
set section key value
Syntax |
$ConfStruct->setSectionKeyValue($Section,$Key, $Value); |
Input |
|