コード例 #1
0
ファイル: icon.php プロジェクト: nathan929/infinity
 /**
  */
 protected function set_property($name, $value)
 {
     switch ($name) {
         case 'primary':
         case 'secondary':
             // set it
             $this->{$name} = $value;
             // chain it
             return $this;
         default:
             return parent::set_property($name, $value);
     }
 }
コード例 #2
0
ファイル: script.php プロジェクト: shads196770/cbox-theme
 /**
  */
 protected function set_property($name, $value)
 {
     switch ($name) {
         case 'alias':
         case 'ready':
             $this->{$name} = (bool) $value;
             break;
         case 'function':
             $this->function = is_bool($value) ? $value : trim($value);
             break;
         default:
             return parent::set_property($name, $value);
     }
     // chain it
     return $this;
 }