Example #1
0
 public function removeOpenTags($tags)
 {
     try {
         $tags = explode(' ', $tags);
         // string to array
         if (!isset($this->openTags)) {
             self::getOpenTags();
         }
         //<-- end if -->
         $remainingTags = array();
         if ($this->openTags) {
             foreach ($this->openTags as $file) {
                 $remainingTags[] = array_diff($file, $tags);
             }
             //<-- end foreach -->
         }
         //<-- end if -->
         $count = count($remainingTags);
         if ($count > 0) {
             foreach ($this->files as $key => $value) {
                 $tags = implode(' ', $remainingTags[$key]);
                 $this->fileList = '\'' . $value . '\'';
                 self::setOpenTags($tags);
             }
             //<-- end foreach -->
             $this->fileList = general::extraImplode($this->files);
         }
         //<-- end if -->
         $this->openTags = $remainingTags;
         $tags = array();
         if ($remainingTags) {
             foreach ($remainingTags as $tag) {
                 $openTagList[] = implode(', ', $tag);
                 // array to string
             }
             //<-- end foreach -->
             return $openTagList;
         }
         //<-- end if -->
     } catch (Exception $e) {
         throw new Exception($e->getMessage() . ' from ' . $this->className . '->' . __FUNCTION__ . '() line ' . __LINE__);
     }
     //<-- end try -->
 }