コード例 #1
0
ファイル: Tag.php プロジェクト: pscheit/psc-cms
 public function guid($set = NULL)
 {
     if (func_num_args() == 1) {
         $guid = $this->guid;
         if ($set != NULL) {
             if (!S::startsWith($set, 'psc-guid-')) {
                 $set = 'psc-guid-' . $set;
             }
             $set = HTML::string2id($set);
         }
         $this->guid = $set;
         if ($this->guid != $guid && $this->hasClass($guid)) {
             $this->removeClass($guid);
             //unpublish
             $this->publishGUID();
         }
         return $this;
     }
     if (!isset($this->guid)) {
         $this->generateGUID();
     }
     return $this->guid;
 }