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


PHP ORM::__set方法代码示例

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


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

示例1: __set

 public function __set($prop, $value)
 {
     if ('name' == $prop) {
         $value = url::title($value);
     }
     parent::__set($prop, $value);
 }
开发者ID:hdragomir,项目名称:ProjectsLounge,代码行数:7,代码来源:tag.php

示例2: __set

 public function __set($col, $value)
 {
     if ('end_time' == $col || 'start_time' == $col) {
         $value = date('Y-m-d H:i:s', strtotime($value));
     }
     return parent::__set($col, $value);
 }
开发者ID:hdragomir,项目名称:SmartStudent,代码行数:7,代码来源:event.php

示例3: __set

 public function __set($key, $value)
 {
     if ($key === 'password') {
         $value = md5($value);
     }
     parent::__set($key, $value);
 }
开发者ID:VinceOmega,项目名称:mcb-nov-build,代码行数:7,代码来源:user.php

示例4: __set

 /**
  * Whenever setting the slug, make sure that it conforms to requirements
  * @developer Brandon Hansen
  * @date Oct 26, 2010
  */
 public function __set($key, $value)
 {
     if ($key == 'slug') {
         $value = format::pretty_url($value);
     }
     parent::__set($key, $value);
 }
开发者ID:ready4god2513,项目名称:scs,代码行数:12,代码来源:category.php

示例5: __set

 public function __set($column, $value)
 {
     if ($column === 'uri') {
         $value = serialize($value);
     }
     parent::__set($column, $value);
 }
开发者ID:jonnyjon,项目名称:Task-Queue,代码行数:7,代码来源:task.php

示例6: __set

 public function __set($key, $value)
 {
     if ($key == "translated_on") {
         parent::__set($key, gmdate("Y-m-d H:i:s", $value));
     }
     return parent::__set($key, $value);
 }
开发者ID:kiirti,项目名称:Ushahidi_MHI,代码行数:7,代码来源:audio_trans.php

示例7: __set

 /**
  * Override set handler to trap pointers in to_occurrence_id to occurrences that don't yet
  * exist, because they come later in the submission. These values come in the form
  * ||pointer||. We have to temporarily null out the field, then store the pointer for
  * later.
  */
 public function __set($key, $value)
 {
     if (substr($key, -16) === 'to_occurrence_id' && preg_match('/^||.+||$/', $value)) {
         $this->to_occurrence_id_pointer = str_replace('||', '', $value);
         $value = null;
     }
     parent::__set($key, $value);
 }
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:14,代码来源:occurrence_association.php

示例8: __set

 public function __set($key, $value)
 {
     if ($key === $this->config['columns']['password']) {
         // Use Auth to hash the password
         $value = Security::instance($this->config_name)->hash_password($value);
     }
     parent::__set($key, $value);
 }
开发者ID:HIVE-Creative,项目名称:spicers,代码行数:8,代码来源:user.php

示例9: __set

 /**
  * Encrypt the data before saving, also stripping out an html
  * @Developer brandon
  * @Date May 18, 2010
  */
 public function __set($key, $value)
 {
     if (in_array($key, array('content', 'title'))) {
         $encrypt = new Encrypt();
         $value = $encrypt->encode(strip_tags($value));
     }
     parent::__set($key, $value);
 }
开发者ID:ready4god2513,项目名称:Journal,代码行数:13,代码来源:journal.php

示例10: __set

 public function __set($key, $value)
 {
     if ($key === 'password') {
         // Use Auth to hash the password
         $value = Auth::instance()->hash_password($value);
     }
     parent::__set($key, $value);
 }
开发者ID:plusjade,项目名称:plusjade,代码行数:8,代码来源:auth_user.php

示例11: __set

 public function __set($key, $value)
 {
     if ($key === 'tags') {
         // Set tag to url-safe format
         $value = url::title($value);
     }
     parent::__set($key, $value);
 }
开发者ID:kolanos,项目名称:kohana-tags,代码行数:8,代码来源:tag.php

示例12: __set

 public function __set($prop, $value)
 {
     Kohana::log('debug', $prop . ' -> ' . Kohana::debug($value));
     if ('tags' == $prop && is_string($value)) {
         return $this->set_tags($value);
     }
     return parent::__set($prop, $value);
 }
开发者ID:hdragomir,项目名称:ProjectsLounge,代码行数:8,代码来源:project.php

示例13: __set

 public function __set($prop, $value)
 {
     if ('user' == $prop || 'project' == $prop) {
         $prop .= '_id';
         $value = $value->id;
     }
     return parent::__set($prop, $value);
 }
开发者ID:hdragomir,项目名称:ProjectsLounge,代码行数:8,代码来源:project_user_role.php

示例14: __set

 /**
  * Ensure that the rules are always followed
  * @Developer brandon
  * @Date Oct 12, 2010
  */
 public function __set($key = NULL, $value = NULL)
 {
     if ($key == 'quantity') {
         // Make sure that we always have a positive integer
         $value = max(1, (int) $value);
     }
     parent::__set($key, $value);
 }
开发者ID:ready4god2513,项目名称:scs,代码行数:13,代码来源:cart_item.php

示例15: __set

 public function __set($key, $value)
 {
     #		kohana::auto_load('Driver_Auth_Local');
     if (!strcmp($key, 'password') or !strcmp($key, 'password_confirm')) {
         $value = Model_Auth_local::hash_password($value);
     }
     parent::__set($key, $value);
 }
开发者ID:jimktrains,项目名称:rccms,代码行数:8,代码来源:local.php


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