ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilDidacticTemplateExcludeFilterPattern Class Reference

Implementation of an include filter pattern for didactic template actions. More...

+ Inheritance diagram for ilDidacticTemplateExcludeFilterPattern:
+ Collaboration diagram for ilDidacticTemplateExcludeFilterPattern:

Public Member Functions

 __construct ($a_pattern_id=0)
 Constructor.
 valid ($a_source)
 Check if patttern matches.
 toXml (ilXmlWriter $writer)
 Write xml.
- Public Member Functions inherited from ilDidacticTemplateFilterPattern
 setPatternId ($a_id)
 set pattern id
 getPatternId ()
 Get pattern id.
 setParentId ($a_id)
 Set parent id.
 getParentId ()
 Get parent id.
 setParentType ($a_type)
 Set parent type.
 getParentType ()
 Get parent type.
 setPatternType ($a_type)
 Set pattern type.
 getPatterType ()
 Get pattern type.
 setPatternSubType ($a_subtype)
 Set pattern sub type.
 getPatternSubType ()
 Get pattern sub type.
 setPattern ($a_pattern)
 Set pattern.
 getPattern ()
 Get pattern.
 update ()
 Update pattern definition.
 save ()
 Create new pattern ilDB $ilDB.
 delete ()
 Delete pattern ilDB $ilDB.
 __clone ()
 Magic clone method.

Additional Inherited Members

- Data Fields inherited from ilDidacticTemplateFilterPattern
const PATTERN_INCLUDE = 1
const PATTERN_EXCLUDE = 2
const PATTERN_SUBTYPE_REGEX = 1
- Protected Member Functions inherited from ilDidacticTemplateFilterPattern
 read ()
 Read pattern definition from db.

Detailed Description

Implementation of an include filter pattern for didactic template actions.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om

Definition at line 12 of file class.ilDidacticTemplateExcludeFilterPattern.php.

Constructor & Destructor Documentation

ilDidacticTemplateExcludeFilterPattern::__construct (   $a_pattern_id = 0)

Constructor.

Parameters
int$a_pattern_id

Reimplemented from ilDidacticTemplateFilterPattern.

Definition at line 19 of file class.ilDidacticTemplateExcludeFilterPattern.php.

References ilDidacticTemplateFilterPattern\setPatternType().

{
parent::__construct($a_pattern_id);
$this->setPatternType(self::PATTERN_EXCLUDE);
}

+ Here is the call graph for this function:

Member Function Documentation

ilDidacticTemplateExcludeFilterPattern::toXml ( ilXmlWriter  $writer)

Write xml.

Parameters
ilXmlWriter$writer

Reimplemented from ilDidacticTemplateFilterPattern.

Definition at line 45 of file class.ilDidacticTemplateExcludeFilterPattern.php.

References ilDidacticTemplateFilterPattern\getPattern(), ilDidacticTemplateFilterPattern\getPatternSubType(), ilDidacticTemplateFilterPattern\PATTERN_SUBTYPE_REGEX, and ilXmlWriter\xmlElement().

{
switch($this->getPatternSubType())
{
default:
$writer->xmlElement(
'excludePattern',
array(
'preg' => $this->getPattern()
)
);
}
}

+ Here is the call graph for this function:

ilDidacticTemplateExcludeFilterPattern::valid (   $a_source)

Check if patttern matches.

Reimplemented from ilDidacticTemplateFilterPattern.

Definition at line 28 of file class.ilDidacticTemplateExcludeFilterPattern.php.

References $GLOBALS, ilDidacticTemplateFilterPattern\getPattern(), and ilDidacticTemplateFilterPattern\getPatternSubType().

{
$a_source = trim($a_source);
switch($this->getPatternSubType())
{
case self::PATTERN_SUBTYPE_REGEX:
$GLOBALS['ilLog']->write(__METHOD__.': Checking exclude pattern with '.$a_source.' against '.$this->getPattern());
return preg_match('/'.$this->getPattern().'/',$a_source) !== 1;
}
return true;
}

+ Here is the call graph for this function:


The documentation for this class was generated from the following file: