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


PHP DataObject::__construct方法代码示例

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


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

示例1: __construct

 public function __construct()
 {
     parent::__construct();
     $query = $this->_db->select()->from('INFORMATION_SCHEMA.TABLES', 'AUTO_INCREMENT')->where('TABLE_NAME = ?', $this->_oDataTableName)->where('TABLE_SCHEMA = ?', $this->_schema);
     $increment = $this->_db->fetchAll($query);
     $this->_currentId = $increment['0']['AUTO_INCREMENT'];
 }
开发者ID:anunay,项目名称:stentors,代码行数:7,代码来源:FormSectionObject.php

示例2: array

 function __construct($tablename = 'eng_work_schedules')
 {
     // Register non-persistent attributes
     // Contruct the object
     parent::__construct($tablename);
     // Set specific characteristics
     $this->idField = 'id';
     // See Factory - identifierField is used to generate next number
     $this->identifierField = array('job_no', 'description');
     $this->orderby = 'job_no';
     $this->setTitle('work_schedules');
     // Define relationships
     $this->BelongsTo('MFCentre', 'centre_id', 'centre');
     $this->BelongsTo('MFDowntimeCode', 'mf_downtime_code_id', 'downtime_code');
     $this->hasMany('EngineeringResource', 'resources', 'work_schedule_id');
     $this->hasMany('WorkScheduleNote', 'notes', 'work_schedule_id');
     //		$this->hasMany('WorkSchedulePart','parts', 'work_schedule_id');
     $this->hasMany('STTransaction', 'transactions', 'process_id');
     // Define field formats
     // Define field defaults
     $this->getField('status')->setDefault('N');
     // Define validation
     $this->validateUniquenessOf('job_no');
     // Define enumerated types
     $this->setEnum('status', array($this->_status_new => 'New', $this->_status_active => 'Active', $this->_status_complete => 'Complete', $this->_status_cancelled => 'Cancelled'));
     // Define link rules for sidebar related view
     // disallow adding new transactions
     $this->linkRules = array('transactions' => array('newtab' => array('new' => true), 'actions' => array('link'), 'rules' => array()));
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:29,代码来源:WorkSchedule.php

示例3: __construct

 public function __construct($record = null, $isSingleton = false, $model = null)
 {
     parent::__construct($record, $isSingleton, $model);
     if ($this->getIdentifier() === 0) {
         $this->Created = MySQLDatabase56::nowRfc2822();
     }
 }
开发者ID:OpenStackweb,项目名称:openstack-org,代码行数:7,代码来源:SummitPackagePurchaseOrder.php

示例4:

 function __construct(sqlConnect $conx = NULL, $table_name = "")
 {
     parent::__construct($conx, $table_name);
     if (RADRIA_LOG_RUN_OFUZ) {
         $this->setLogRun(OFUZ_LOG_RUN_MESSAGE);
     }
 }
开发者ID:jacquesbagui,项目名称:ofuz,代码行数:7,代码来源:ContactMessage.class.php

示例5: __construct

 /**
  * Class constructor
  * 
  * @param array $options
  *
  * @return void
  */
 public function __construct($options = null)
 {
     parent::__construct();
     $this->_oData = new $this->_dataClass();
     $this->_dataTableName = $this->_oData->info('name');
     $this->_updateParams = $options;
 }
开发者ID:anunay,项目名称:stentors,代码行数:14,代码来源:FormQuestionOptionObject.php

示例6: __construct

 public function __construct()
 {
     $this->_baseUrl = Zend_Controller_Front::getInstance()->getBaseUrl();
     parent::__construct();
     $query = $this->_db->select()->from('INFORMATION_SCHEMA.TABLES', 'AUTO_INCREMENT')->where($this->_db->quoteInto('TABLE_NAME = ?', 'Form_Element') . ' OR ' . $this->_db->quoteInto('TABLE_NAME = ?', 'Form_Question'))->where('TABLE_SCHEMA = ?', $this->_schema);
     $this->_increments = $this->_db->fetchAll($query);
 }
开发者ID:anunay,项目名称:stentors,代码行数:7,代码来源:FormQuestionObject.php

示例7: array

 function __construct($tablename = 'so_despatchlines')
 {
     // Register non-persistent attributes
     // Contruct the object
     parent::__construct($tablename);
     // Set specific characteristics
     $this->idField = 'id';
     $this->orderby = array('despatch_number', 'orderline_id');
     $this->orderdir = 'DESC';
     // Define relationships
     $this->belongsTo('SOrder', 'order_id', 'order_number');
     $this->belongsTo('SOrderLine', 'orderline_id', 'order_line');
     $this->belongsTo('SLCustomer', 'slmaster_id', 'customer');
     $this->belongsTo('SOProductline', 'productline_id', 'description');
     $this->belongsTo('STuom', 'stuom_id', 'uom_name');
     $this->belongsTo('STItem', 'stitem_id', 'stitem');
     $this->hasOne('WHAction', 'despatch_action', 'despatch_from');
     $this->hasOne('SOrderLine', 'orderline_id', 'order_line_detail');
     // Define field formats
     // Define formatters
     // Define validation
     // Define enumerated types
     $this->setEnum('status', array('N' => 'New', 'D' => 'Despatched', 'X' => 'Cancelled'));
     // Define rules for related items links
     // Define system defaults
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:26,代码来源:SODespatchLine.php

示例8:

 function __construct($tablename = 'project_categories')
 {
     parent::__construct($tablename);
     $this->idField = 'id';
     $this->identifierField = 'name';
     $this->validateUniquenessOf('id');
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:7,代码来源:Projectcategory.php

示例9: array

 function __construct($tablename = 'gl_account_centres')
 {
     // Register non-persistent attributes
     // Construct the object
     parent::__construct($tablename);
     // Set specific characteristics
     $this->identifierField = 'glaccount ||\'/\'|| glcentre';
     // Set ordering attributes
     // Define validation
     // Define relationships
     $this->belongsTo('GLAccount', 'glaccount_id', 'glaccount');
     $this->belongsTo('GLCentre', 'glcentre_id', 'glcentre');
     $this->hasMany('Currency', 'currencies', array('writeoff_glaccount_id', 'glcentre_id'), array('glaccount_id', 'glcentre_id'), FALSE);
     $this->hasMany('CBAccount', 'cb_accounts', array('glaccount_id', 'glcentre_id'), array('glaccount_id', 'glcentre_id'), FALSE);
     $this->hasMany('WHLocation', 'wh_locations', array('glaccount_id', 'glcentre_id'), array('glaccount_id', 'glcentre_id'), FALSE);
     $this->hasMany('PeriodicPayment', 'periodic_payments', 'glaccount_centre_id', NULL, FALSE);
     $this->hasMany('PInvoiceLine', 'pi_lines', 'glaccount_centre_id', NULL, FALSE);
     $this->hasMany('POrderLine', 'po_lines', 'glaccount_centre_id', NULL, FALSE);
     $this->hasMany('SInvoiceLine', 'si_lines', 'glaccount_centre_id', NULL, FALSE);
     $this->hasMany('SOrderLine', 'so_lines', 'glaccount_centre_id', NULL, FALSE);
     // Define field formats
     // Define enumerated types
     // Define system defaults
     // Define related item rules
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:25,代码来源:GLAccountCentre.php

示例10:

 function __construct($tablename = 'project_notes')
 {
     parent::__construct($tablename);
     $this->idField = 'id';
     $this->belongsTo('Project', 'project_id', 'project');
     $this->belongsTo('ProjectNoteType', 'type_id', 'type');
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:7,代码来源:ProjectNote.php

示例11: __construct

 public function __construct($tablename = 'po_product_lines_header')
 {
     // Register non-persistent attributes
     // Contruct the object
     parent::__construct($tablename);
     // Set specific characteristics
     $this->idField = 'id';
     $this->identifierField = 'description';
     $this->orderby = 'description';
     $this->setTitle('PO Product');
     // Define relationships
     $this->belongsTo('STItem', 'stitem_id', 'stitem');
     $this->belongsTo('STuom', 'stuom_id', 'uom_name');
     $this->belongsTo('GLAccount', 'glaccount_id', 'gl_account');
     $this->belongsTo('GLCentre', 'glcentre_id', 'gl_centre');
     $this->belongsTo('TaxRate', 'tax_rate_id', 'tax_rate');
     $this->belongsTo('STProductgroup', 'prod_group_id', 'product_group');
     $this->hasOne('STItem', 'stitem_id', 'item_detail');
     $this->hasMany('POProductLine', 'lines', 'productline_header_id');
     // Define field formats
     // set formatters
     // Define validation
     $this->validateUniquenessOf('stitem_id', NULL, TRUE);
     $this->validateUniquenessOf('description');
     // Define enumerated types
     // set defaults
     // Set link rules for 'belongs to' to appear in related view controller sidebar
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:28,代码来源:POProductlineHeader.php

示例12: ConstraintChain

 function __construct($tablename = 'party')
 {
     parent::__construct($tablename);
     $this->idField = 'id';
     $this->hasMany('PartyContactMethod', 'contactmethods', 'party_id', null, TRUE);
     $this->hasMany('PartyAddress', 'addresses', 'party_id', null, TRUE);
     $cc = new ConstraintChain();
     $cc->add(new Constraint('main', '=', 'true'));
     $this->setAlias('main_address', 'PartyAddress', $cc, 'main_address', array('street1', 'street2', 'street3', 'town', 'county', 'postcode', 'country'), 'party_id');
     $cc = new ConstraintChain();
     $cc->add(new Constraint('main', '=', 'true'));
     $cc->add(new Constraint('type', '=', 'T'));
     $this->setAlias('phone', 'PartyContactMethod', $cc, 'contact', array(), 'party_id');
     $cc = new ConstraintChain();
     $cc->add(new Constraint('main', '=', 'true'));
     $cc->add(new Constraint('type', '=', 'M'));
     $this->setAlias('mobile', 'PartyContactMethod', $cc, 'contact', array(), 'party_id');
     $cc = new ConstraintChain();
     $cc->add(new Constraint('main', '=', 'true'));
     $cc->add(new Constraint('type', '=', 'F'));
     $this->setAlias('fax', 'PartyContactMethod', $cc, 'contact', array(), 'party_id');
     $cc = new ConstraintChain();
     $cc->add(new Constraint('main', '=', 'true'));
     $cc->add(new Constraint('type', '=', 'E'));
     $this->setAlias('email', 'PartyContactMethod', $cc, 'contact', array(), 'party_id');
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:26,代码来源:Party.php

示例13:

 function __construct($tablename = 'uzlet_modules')
 {
     parent::__construct($tablename);
     $this->idField = 'id';
     $this->belongsTo('Uzlet', 'uzlet_id', 'uzlet');
     $this->hasOne('ModuleObject', 'module_id', 'module');
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:7,代码来源:UzletModule.php

示例14: array

 function __construct($tablename = 'ticket_module_versions')
 {
     parent::__construct($tablename);
     $this->idField = 'id';
     $this->orderby = array('module', 'version');
     $this->belongsTo('Ticket', 'ticket_id');
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:7,代码来源:TicketModuleVersion.php

示例15: __construct

 public function __construct($path = '')
 {
     $this->path = $path;
     parent::__construct('file');
     $this->idField = 'id';
     $this->getField('size')->setFormatter(new FilesizeFormatter());
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:7,代码来源:File.php


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