当前位置: 首页>>代码示例>>PHP>>正文


PHP Base::__set方法代码示例

本文整理汇总了PHP中Base::__set方法的典型用法代码示例。如果您正苦于以下问题:PHP Base::__set方法的具体用法?PHP Base::__set怎么用?PHP Base::__set使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Base的用法示例。


在下文中一共展示了Base::__set方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __set

 public function __set($name, $value)
 {
     global $zbp;
     switch ($name) {
         case 'Category':
         case 'Author':
         case 'TypeName':
         case 'Url':
         case 'Tags':
         case 'TagsName':
         case 'TagsCount':
         case 'CommentPostUrl':
         case 'Prev':
         case 'Next':
             return null;
             break;
         case 'Template':
             if ($value == $zbp->option['ZC_POST_DEFAULT_TEMPLATE']) {
                 $value = '';
             }
             return $this->Data[$name] = $value;
             break;
         default:
             parent::__set($name, $value);
             break;
     }
 }
开发者ID:jdjjdkdkdm,项目名称:zblogphp,代码行数:27,代码来源:post.php

示例2: __set

 /**
  * @param $name
  * @param $value
  * @return null|string
  */
 public function __set($name, $value)
 {
     global $zbp;
     if ($name == 'Url') {
         return null;
     }
     if ($name == 'Symbol') {
         return null;
     }
     if ($name == 'Level') {
         return null;
     }
     if ($name == 'SymbolName') {
         return null;
     }
     if ($name == 'Parent') {
         return null;
     }
     if ($name == 'Template') {
         if ($value == $zbp->option['ZC_INDEX_DEFAULT_TEMPLATE']) {
             $value = '';
         }
         return $this->data[$name] = $value;
     }
     if ($name == 'LogTemplate') {
         if ($value == $zbp->option['ZC_POST_DEFAULT_TEMPLATE']) {
             $value = '';
         }
         return $this->data[$name] = $value;
     }
     parent::__set($name, $value);
 }
开发者ID:ijustyce,项目名称:zblogphp,代码行数:37,代码来源:category.php

示例3: __set

 /**
  * 自定义参数及值
  * @param $name
  * @param $value
  * @return null|string
  */
 public function __set($name, $value)
 {
     global $zbp;
     if ($name == 'Url') {
         $u = new UrlRule($zbp->option['ZC_AUTHOR_REGEX']);
         $u->Rules['{%id%}'] = $this->ID;
         $u->Rules['{%alias%}'] = $this->Alias == '' ? urlencode($this->Name) : $this->Alias;
         return $u->Make();
     }
     if ($name == 'Avatar') {
         return null;
     }
     if ($name == 'LevelName') {
         return null;
     }
     if ($name == 'EmailMD5') {
         return null;
     }
     if ($name == 'StaticName') {
         return null;
     }
     if ($name == 'Template') {
         if ($value == $zbp->option['ZC_INDEX_DEFAULT_TEMPLATE']) {
             $value = '';
         }
         return $this->data[$name] = $value;
     }
     parent::__set($name, $value);
 }
开发者ID:jdjjdkdkdm,项目名称:zblogphp,代码行数:35,代码来源:member.php

示例4: message

 function __set($key, $value)
 {
     if (isset($this->filters[$key]) and !$this->is_filter[$this->filters[$key]]($value)) {
         message(App::$lang_common['Bad request'] . ' Passed parameter is invalid');
     }
     parent::__set($key, $value);
 }
开发者ID:mdb-webdev,项目名称:punbb_extensions,代码行数:7,代码来源:controller.php

示例5: __set

 /**
  * 自定义参数及值
  * @param $name
  * @param $value
  * @return null|string
  */
 public function __set($name, $value)
 {
     global $zbp;
     if ($name == 'Url') {
         return null;
     }
     if ($name == 'Avatar') {
         return null;
     }
     if ($name == 'LevelName') {
         return null;
     }
     if ($name == 'EmailMD5') {
         return null;
     }
     if ($name == 'StaticName') {
         return null;
     }
     if ($name == 'Template') {
         if ($value == $zbp->option['ZC_INDEX_DEFAULT_TEMPLATE']) {
             $value = '';
         }
         return $this->data[$name] = $value;
     }
     if ($name == 'PassWord_MD5Path') {
         return null;
     }
     if ($name == 'IsGod') {
         return null;
     }
     parent::__set($name, $value);
 }
开发者ID:zblogcn,项目名称:zblogphp,代码行数:38,代码来源:member.php

示例6: __set

 public function __set($name, $value)
 {
     global $zbp;
     if ($name == 'SourceType') {
         return null;
     }
     parent::__set($name, $value);
 }
开发者ID:jdjjdkdkdm,项目名称:zblogphp,代码行数:8,代码来源:module.php

示例7: __set

 /**
  * 设置参数值
  * @param string $name
  * @param mixed $value
  * @return null
  */
 public function __set($name, $value)
 {
     global $zbp;
     if ($name == 'SourceType') {
         return null;
     }
     if ($name == 'NoRefresh') {
         if ((bool) $value) {
             $this->Metas->norefresh = (bool) $value;
         } else {
             $this->Metas->Del('norefresh');
         }
         return null;
     }
     parent::__set($name, $value);
 }
开发者ID:jdjjdkdkdm,项目名称:zblogphp,代码行数:22,代码来源:module.php

示例8: switch

 /**
  * Sets the variables of the object and updates the database if nescessary.
  * Unrecognized properties are forwarded to it's parent
  * @param string $property The property which to change
  * @param mixed $value The new value of the property
  * @see solidbase/lib/Base#__set($property, $value)
  */
 function __set($property, $value)
 {
     switch ($property) {
         case 'place':
             $this->move($value);
             break;
         case 'parent':
             if (@$Controller->alias('menu_editor')->mayI(EDIT)) {
                 $this->move('last', $value);
             }
             break;
         default:
             parent::__set($property, $value);
             break;
     }
 }
开发者ID:jonatanolofsson,项目名称:solidba.se,代码行数:23,代码来源:MenuItem.php

示例9: __set

 public function __set($name, $value)
 {
     global $zbp;
     if ($name == 'Author') {
         return null;
     }
     if ($name == 'Comments') {
         return null;
     }
     if ($name == 'Level') {
         return null;
     }
     if ($name == 'Post') {
         return null;
     }
     parent::__set($name, $value);
 }
开发者ID:jdjjdkdkdm,项目名称:zblogphp,代码行数:17,代码来源:comment.php

示例10: __set

 /**
  * 设置参数值
  * @param string $name
  * @param mixed $value
  * @return null
  */
 public function __set($name, $value)
 {
     global $zbp;
     if ($name == 'SourceType') {
         return null;
     }
     if ($name == 'NoRefresh') {
         $n = 'module_norefresh_' . $this->FileName;
         if ($value == true) {
             $zbp->cache->{$n} = true;
             $zbp->SaveCache();
         } else {
             if ($zbp->cache->HasKey($n) == true) {
                 $zbp->cache->Del($n);
                 $zbp->SaveCache();
             }
         }
         return null;
     }
     parent::__set($name, $value);
 }
开发者ID:jdjjdkdkdm,项目名称:zblogphp,代码行数:27,代码来源:module.php

示例11: __set

 /**
  * @param $name
  * @param $value
  * @return null
  */
 public function __set($name, $value)
 {
     global $zbp;
     if ($name == 'Url') {
         return null;
     }
     if ($name == 'Dir') {
         return null;
     }
     if ($name == 'FullFile') {
         return null;
     }
     if ($name == 'Author') {
         return null;
     }
     parent::__set($name, $value);
 }
开发者ID:zblogcn,项目名称:zblogphp,代码行数:22,代码来源:upload.php

示例12: __set

 /**
  * 自定义参数及值
  * @param $name
  * @param $value
  * @return null|string
  */
 public function __set($name, $value)
 {
     global $zbp;
     if ($name == 'Url') {
         foreach ($GLOBALS['hooks']['Filter_Plugin_Member_Url'] as $fpname => &$fpsignal) {
             $fpsignal = PLUGIN_EXITSIGNAL_NONE;
             $fpreturn = $fpname($this);
             if ($fpsignal == PLUGIN_EXITSIGNAL_RETURN) {
                 return $fpreturn;
             }
         }
         $u = new UrlRule($zbp->option['ZC_AUTHOR_REGEX']);
         $u->Rules['{%id%}'] = $this->ID;
         $u->Rules['{%alias%}'] = $this->Alias == '' ? rawurlencode($this->Name) : $this->Alias;
         return $u->Make();
     }
     if ($name == 'Avatar') {
         return null;
     }
     if ($name == 'LevelName') {
         return null;
     }
     if ($name == 'EmailMD5') {
         return null;
     }
     if ($name == 'StaticName') {
         return null;
     }
     if ($name == 'Template') {
         if ($value == $zbp->option['ZC_INDEX_DEFAULT_TEMPLATE']) {
             $value = '';
         }
         return $this->data[$name] = $value;
     }
     if ($name == 'PassWord_MD5Path') {
         return null;
     }
     if ($name == 'IsGod') {
         return null;
     }
     parent::__set($name, $value);
 }
开发者ID:ijustyce,项目名称:zblogphp,代码行数:48,代码来源:member.php

示例13: __set

 /**
  * @param $name
  * @param $value
  * @return null|string
  */
 public function __set($name, $value)
 {
     global $zbp;
     switch ($name) {
         case 'Category':
         case 'Author':
         case 'TypeName':
         case 'Url':
         case 'Tags':
         case 'TagsName':
         case 'TagsCount':
         case 'CommentPostUrl':
         case 'Prev':
         case 'Next':
         case 'RelatedList':
             return null;
             break;
         case 'Template':
             if ($value == $zbp->GetPostType_Template($this->Type)) {
                 $value = '';
             }
             return $this->data[$name] = $value;
             break;
         case 'TopType':
             if ($value == 'global' || $value == 'category') {
                 $this->Metas->toptype = $value;
             } elseif ($value == '' || $value == null) {
                 $this->Metas->Del('toptype');
             } else {
                 $this->Metas->toptype = 'index';
             }
             return null;
             break;
         default:
             parent::__set($name, $value);
             break;
     }
 }
开发者ID:zblogcn,项目名称:zblogphp,代码行数:43,代码来源:post.php

示例14: __set

 /**
  * Sets the variable to the given value and updates the database, if allowed. If the property is unknown, the call is passed to parent class.
  * @access public
  * @param string $property The property to edit
  * @param mixed $value The value to set the property with
  */
 function __set($property, $value)
 {
     global $DB, $USER;
     $ipn = '_' . $property;
     switch ($property) {
         case 'password':
             if ($this->password == 'LDAP') {
                 break;
             }
             if (empty($value)) {
                 return false;
             }
             $value = pwdEncode($value);
             //NOTE: No break here
         //NOTE: No break here
         case 'username':
             if (empty($value)) {
                 return false;
             }
             Base::__set('Name', $value);
         case 'passwordhash':
             // passwordhash bypasses pwdEncode and sets the raw password hash.
             if (empty($value)) {
                 return false;
             }
             if ($property == 'passwordhash') {
                 $ipn = '_password';
                 $property = 'password';
             }
             if ($this->{$ipn} === $value) {
                 break;
             }
             $this->{$ipn} = $value;
             $DB->users->{$this->ID} = array($property => $value);
             break;
         case 'userinfo':
             if (!is_array($value)) {
                 return false;
             }
             foreach ($value as $prop => $val) {
                 $DB->userinfo->update(array('val' => $val), array('prop' => $prop, 'id' => $this->ID), true);
             }
             $this->_userinfo = array_merge($this->_userinfo, $value);
             break;
         default:
             parent::__set($property, $value);
     }
 }
开发者ID:jonatanolofsson,项目名称:solidba.se,代码行数:54,代码来源:User.php

示例15: array

 function __set($property, $value)
 {
     global $DB;
     $ipn = '_' . $property;
     if (in_array($property, array('page', 'type', 'row', 'place', 'content'))) {
         $this->{$ipn} = $value;
         $DB->pagelayout->{$this->ID} = array($property => $value);
     } elseif ($property == 'module') {
         $this->{$ipn} = $value;
         $DB->pagelayout->{$this->ID} = array($property => $value);
         $this->reset();
     } elseif ($property == 'size') {
         if ($this->_row === false) {
             $this->ld();
         }
         $size = $DB->pagelayout->getCell(array('id!' => $this->ID, 'pid' => $this->page, 'row' => $this->row), "SUM(`size`)");
         if ($size + $value > $this->maxcols) {
             Flash::create('Wrong size! The box won\'t fit');
             return false;
         }
         $this->{$ipn} = $value;
         $DB->pagelayout->{$this->ID} = array($property => $value);
     } else {
         parent::__set($property, $value);
     }
 }
开发者ID:jonatanolofsson,项目名称:solidba.se,代码行数:26,代码来源:PageLayoutEditor.php


注:本文中的Base::__set方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。