當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。