public function addTemplateDirectory($templateType, $templateName, $templateDirectory, $key, $addAtBeginning = false)
    {
        Tlog::getInstance()->addDebug("Adding template directory $templateDirectory, type:$templateType name:$templateName, key: $key");

        if (true === $addAtBeginning && isset($this->templateDirectories[$templateType][$templateName])) {
            // When using array_merge, the key was set to 0. Use + instead.
            $this->templateDirectories[$templateType][$templateName] =
                [ $key => $templateDirectory ] + $this->templateDirectories[$templateType][$templateName]
            ;
        } else {
            $this->templateDirectories[$templateType][$templateName][$key] = $templateDirectory;
        }
    }
public function addTemplateDirectory($templateType, $templateName, $templateDirectory, $key, $addAtBeginning = false)
    {
        Tlog::getInstance()->addDebug("Adding template directory $templateDirectory, type:$templateType name:$templateName, key: $key");

        if (true === $addAtBeginning && isset($this->templateDirectories[$templateType][$templateName])) {
            // When using array_merge, the key was set to 0. Use + instead.
            $this->templateDirectories[$templateType][$templateName] =
                [ $key => $templateDirectory ] + $this->templateDirectories[$templateType][$templateName]
            ;
        } else {
            $this->templateDirectories[$templateType][$templateName][$key] = $templateDirectory;
        }
    }
public function addTemplateDirectory ( $ templateType , $ templateName , $ templateDirectory , $ key , $ addAtBeginning = false ) { Tlog :: getInstance ( ) -> addDebug ( "Adding template directory $templateDirectory, type:$templateType name:$templateName, key: $key" ) ; if ( true === $ addAtBeginning && isset ( $ this -> templateDirectories [ $ templateType ] [ $ templateName ] ) ) { // When using array_merge, the key was set to 0. Use + instead. $ this -> templateDirectories [ $ templateType ] [ $ templateName ] = [ $ key => $ templateDirectory ] + $ this -> templateDirectories [ $ templateType ] [ $ templateName ] ; } else { $ this -> templateDirectories [ $ templateType ] [ $ templateName ] [ $ key ] = $ templateDirectory ; } }
Add a template directory to the current template list

@param int     $templateType      the template type (a TemplateDefinition type constant)
@param string  $templateName      the template name
@param string  $templateDirectory path to the template directory
@param string  $key               ???
@param boolean $addAtBeginning    if true, the template definition should be added at the beginning of the template directory list
Add a template directory to the current template list