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


PHP DataObject::DataObject方法代码示例

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


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

示例1: Group

 /**
  * Constructor
  *
  * @param object DB row
  */
 function Group($db_row = NULL)
 {
     // Call parent constructor:
     parent::DataObject('T_groups', 'grp_', 'grp_ID');
     if ($db_row == NULL) {
         // echo 'Creating blank group';
         $this->set('name', T_('New group'));
         $this->set('perm_blogs', 'user');
         $this->set('perm_stats', 'none');
     } else {
         // echo 'Instanciating existing group';
         $this->ID = $db_row->grp_ID;
         $this->name = $db_row->grp_name;
         $this->level = $db_row->grp_level;
         $this->perm_blogs = $db_row->grp_perm_blogs;
         $this->perm_bypass_antispam = $db_row->grp_perm_bypass_antispam;
         $this->perm_xhtmlvalidation = $db_row->grp_perm_xhtmlvalidation;
         $this->perm_xhtmlvalidation_xmlrpc = $db_row->grp_perm_xhtmlvalidation_xmlrpc;
         $this->perm_xhtml_css_tweaks = $db_row->grp_perm_xhtml_css_tweaks;
         $this->perm_xhtml_iframes = $db_row->grp_perm_xhtml_iframes;
         $this->perm_xhtml_javascript = $db_row->grp_perm_xhtml_javascript;
         $this->perm_xhtml_objects = $db_row->grp_perm_xhtml_objects;
         $this->perm_stats = $db_row->grp_perm_stats;
     }
 }
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:30,代码来源:_group.class.php

示例2: Link

 /**
  * Constructor
  *
  * @param table Database row
  */
 function Link($db_row = NULL)
 {
     // Call parent constructor:
     parent::DataObject('T_links', 'link_', 'link_ID', 'datecreated', 'datemodified', 'creator_user_ID', 'lastedit_user_ID');
     if ($db_row != NULL) {
         $this->ID = $db_row->link_ID;
         $this->ltype_ID = $db_row->link_ltype_ID;
         // source of link:
         if ($db_row->link_itm_ID != NULL) {
             // Item
             $this->LinkOwner =& get_link_owner('item', $db_row->link_itm_ID);
         } elseif ($db_row->link_cmt_ID != NULL) {
             // Comment
             $this->LinkOwner =& get_link_owner('comment', $db_row->link_cmt_ID);
         } else {
             // User
             $this->LinkOwner =& get_link_owner('user', $db_row->link_usr_ID);
         }
         $this->file_ID = $db_row->link_file_ID;
         // TODO: dh> deprecated, check where it's used, and fix it.
         $this->File =& $this->get_File();
         $this->position = $db_row->link_position;
         $this->order = $db_row->link_order;
     } else {
         // New object:
     }
 }
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:32,代码来源:_link.class.php

示例3: Group

 /**
  * Constructor
  *
  * @param object DB row
  */
 function Group($db_row = NULL)
 {
     // Call parent constructor:
     parent::DataObject('T_groups', 'grp_', 'grp_ID');
     $this->delete_restrictions = array(array('table' => 'T_users', 'fk' => 'user_grp_ID', 'msg' => T_('%d users in this group')));
     $this->delete_cascades = array();
     if ($db_row == NULL) {
         // echo 'Creating blank group';
         $this->set('name', T_('New group'));
         $this->set('perm_blogs', 'user');
         $this->set('perm_stats', 'none');
     } else {
         // echo 'Instanciating existing group';
         $this->ID = $db_row->grp_ID;
         $this->name = $db_row->grp_name;
         $this->perm_blogs = $db_row->grp_perm_blogs;
         $this->perm_bypass_antispam = $db_row->grp_perm_bypass_antispam;
         $this->perm_xhtmlvalidation = $db_row->grp_perm_xhtmlvalidation;
         $this->perm_xhtmlvalidation_xmlrpc = $db_row->grp_perm_xhtmlvalidation_xmlrpc;
         $this->perm_xhtml_css_tweaks = $db_row->grp_perm_xhtml_css_tweaks;
         $this->perm_xhtml_iframes = $db_row->grp_perm_xhtml_iframes;
         $this->perm_xhtml_javascript = $db_row->grp_perm_xhtml_javascript;
         $this->perm_xhtml_objects = $db_row->grp_perm_xhtml_objects;
         $this->perm_stats = $db_row->grp_perm_stats;
     }
 }
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:31,代码来源:_group.class.php

示例4: Meeting

 function Meeting()
 {
     parent::DataObject();
     $this->meetingAttendances = array();
     $this->removedMeetingAttendances = array();
     $this->meetingSectionDecisions = array();
     $this->removedMeetingSectionDecisions = array();
 }
开发者ID:JovanyJeff,项目名称:hrp,代码行数:8,代码来源:Meeting.inc.php

示例5: Citation

 /**
  * Constructor.
  * @param $rawCitation string an unparsed citation string
  */
 function Citation($rawCitation = null)
 {
     // Switch on meta-data adapter support.
     $this->setHasLoadableAdapters(true);
     parent::DataObject();
     $this->setRawCitation($rawCitation);
     // this will set state to CITATION_RAW
 }
开发者ID:doana,项目名称:pkp-lib,代码行数:12,代码来源:Citation.inc.php

示例6: ItemTag

 /**
  * Constructor
  *
  * @param object table Database row
  */
 function ItemTag($db_row = NULL)
 {
     // Call parent constructor:
     parent::DataObject('T_items__tag', 'tag_', 'tag_ID');
     if ($db_row != NULL) {
         $this->ID = $db_row->tag_ID;
         $this->name = $db_row->tag_name;
     }
 }
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:14,代码来源:_itemtag.class.php

示例7: ItemType

 /**
  * Constructor
  *
  *
  * @param table Database row
  */
 function ItemType($db_row = NULL)
 {
     // Call parent constructor:
     parent::DataObject('T_items__type', 'ptyp_', 'ptyp_ID');
     $this->delete_restrictions = array(array('table' => 'T_ityp_col', 'fk' => 'itco_ityp_ID', 'msg' => T_('%d related collections')), array('table' => 'T_items__item', 'fk' => 'post_ptyp_ID', 'msg' => T_('%d related items')));
     if ($db_row != NULL) {
         $this->ID = $db_row->ptyp_ID;
         $this->name = $db_row->ptyp_name;
     }
 }
开发者ID:LFSF,项目名称:oras,代码行数:16,代码来源:_itemtype.class.php

示例8: ItemStatus

 /**
  * Constructor
  *
  *
  * @param table Database row
  */
 function ItemStatus($db_row = NULL)
 {
     // Call parent constructor:
     parent::DataObject('T_items__status', 'pst_', 'pst_ID');
     // Allow inseting specific IDs
     $this->allow_ID_insert = true;
     if ($db_row != NULL) {
         $this->ID = $db_row->pst_ID;
         $this->name = $db_row->pst_name;
     }
 }
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:17,代码来源:_itemstatus.class.php

示例9: Organization

 /**
  * Constructor
  *
  * @param object DB row
  */
 function Organization($db_row = NULL)
 {
     // Call parent constructor:
     parent::DataObject('T_users__organization', 'org_', 'org_ID');
     if ($db_row != NULL) {
         // Loading an object from DB:
         $this->ID = $db_row->org_ID;
         $this->name = $db_row->org_name;
         $this->url = $db_row->org_url;
     }
 }
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:16,代码来源:_organization.class.php

示例10: Slug

 /**
  * Constructor
  *
  * @param object table Database row
  */
 function Slug($db_row = NULL)
 {
     // Call parent constructor:
     parent::DataObject('T_slug', 'slug_', 'slug_ID');
     if ($db_row != NULL) {
         $this->ID = $db_row->slug_ID;
         $this->title = $db_row->slug_title;
         $this->type = $db_row->slug_type;
         $this->itm_ID = $db_row->slug_itm_ID;
     }
 }
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:16,代码来源:_slug.class.php

示例11: Submission

 /**
  * Constructor.
  */
 function Submission()
 {
     parent::DataObject();
     $this->authors = array();
     $this->removedAuthors = array();
     $this->sources = array();
     $this->removedSources = array();
     $this->abstracts = array();
     $this->removedAbstracts = array();
     $this->proposalDetailsDAO =& DAORegistry::getDAO('ProposalDetailsDAO');
 }
开发者ID:JovanyJeff,项目名称:hrp,代码行数:14,代码来源:Submission.inc.php

示例12: Domain

 /**
  * Constructor
  *
  * @param object table Database row
  */
 function Domain($db_row = NULL)
 {
     // Call parent constructor:
     parent::DataObject('T_basedomains', 'dom_', 'dom_ID');
     if ($db_row != NULL) {
         $this->ID = $db_row->dom_ID;
         $this->name = $db_row->dom_name;
         $this->status = $db_row->dom_status;
         $this->type = $db_row->dom_type;
     }
 }
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:16,代码来源:_domain.class.php

示例13: Citation

 /**
  * Constructor.
  * @param $rawCitation string an unparsed citation string
  */
 function Citation($rawCitation = null)
 {
     parent::DataObject();
     // Add NLM meta-data adapter.
     // FIXME: This will later be done via plugin/user-configurable settings,
     // see comment in DataObject::DataObject().
     $metadataAdapter = new NlmCitationSchemaCitationAdapter();
     $this->addSupportedMetadataAdapter($metadataAdapter);
     $this->setRawCitation($rawCitation);
     // this will set state to CITATION_RAW
 }
开发者ID:master3395,项目名称:CBPPlatform,代码行数:15,代码来源:Citation.inc.php

示例14: Mail

 /**
  * Constructor.
  */
 function Mail()
 {
     parent::DataObject();
     $this->privateParams = array();
     if (Config::getVar('email', 'allow_envelope_sender')) {
         $defaultEnvelopeSender = Config::getVar('email', 'default_envelope_sender');
         if (!empty($defaultEnvelopeSender)) {
             $this->setEnvelopeSender($defaultEnvelopeSender);
         }
     }
 }
开发者ID:ramonsodoma,项目名称:pkp-lib,代码行数:14,代码来源:Mail.inc.php

示例15: Currency

 /**
  * Constructor
  *
  * @param object database row
  */
 function Currency($db_row = NULL)
 {
     // Call parent constructor:
     parent::DataObject('T_regional__currency', 'curr_', 'curr_ID');
     if ($db_row) {
         $this->ID = $db_row->curr_ID;
         $this->code = $db_row->curr_code;
         $this->shortcut = $db_row->curr_shortcut;
         $this->name = $db_row->curr_name;
         $this->enabled = $db_row->curr_enabled;
     }
 }
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:17,代码来源:_currency.class.php


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