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


PHP Import::__construct方法代码示例

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


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

示例1: __construct

 public function __construct($upload_id)
 {
     parent::__construct('commercialauditing', $upload_id);
     $regions = Config::get('plr.frontend.filter_order.commercial-auditing.region');
     $regions = array_pluck($regions, 'dbLabel');
     $this->string('country')->position(0);
     $this->string('reference')->position(1)->insert();
     $this->string('company')->position(2)->insert();
     $this->string('brand')->position(3)->insert();
     $this->string('product')->position(4)->insert();
     $this->integer('spots')->position(5)->insert();
     $this->seconds('airtime')->position(6)->insert();
     $this->enum('region', $regions)->position(7);
     $this->string('channel')->position(8);
     $this->string('season')->position(9);
     $this->integer('productcategory_id')->insert();
     $this->integer('territory_id')->insert();
     $this->integer('channel_id')->insert();
     $this->integer('upload_id')->insert();
     $this->integer('season_id')->insert();
     $this->datetime('created_at', 'Y-m-d H:i:s')->insert();
     $this->datetime('updated_at', 'Y-m-d H:i:s')->insert();
     $this->relation('productcategories', 'productcategory_id')->field('name', 'product')->onBeforeInsert([$this, 'makeTimestamps']);
     $this->relation('territories', 'territory_id')->field('name', 'country')->field('region', 'region')->onBeforeInsert([$this, 'makeAbb'])->onBeforeInsert([$this, 'makeTimestamps']);
     $this->relation('channels', 'channel_id')->field('name', 'channel')->onBeforeInsert([$this, 'addUploadId'])->onBeforeInsert([$this, 'makeAbb'])->onBeforeInsert([$this, 'makeTimestamps']);
     $this->relation('seasons', 'season_id')->field('name', 'season')->onBeforeInsert([$this, 'makeTimestamps']);
     $this->on('parsed', [$this, 'makeTimestamps']);
 }
开发者ID:jjc88,项目名称:PHP-Importer,代码行数:28,代码来源:CommercialImport.php

示例2: __construct

 public function __construct($upload_id)
 {
     parent::__construct('matches', $upload_id);
     $this->string('competition')->position(0);
     $this->date('date', 'd/m/Y')->position(1);
     $this->string('day')->position(2);
     $this->time('time', 'H:i:s')->position(3);
     $this->string('home_club')->position(4);
     $this->string('away_club')->position(5);
     $this->integer('attendance')->position(6)->insert();
     $this->integer('capacity')->position(7)->insert();
     $this->string('broadcaster')->position(8);
     $this->string('season')->position(9);
     $this->date('start', 'Y-m-d H:i:s')->insert();
     $this->integer('competition_id')->insert();
     $this->integer('season_id')->insert();
     $this->integer('broadcaster_id')->insert();
     $this->integer('home_club_id')->insert();
     $this->integer('away_club_id')->insert();
     $this->integer('upload_id')->insert();
     $this->relation('competitions', 'competition_id')->field('name', 'competition')->onBeforeInsert(array($this, 'makeAbb'))->onBeforeInsert(array($this, 'makeTimestamps'));
     $this->relation('clubs', 'home_club_id')->field('name', 'home_club')->onBeforeInsert(array($this, 'makeAbb'))->onBeforeInsert(array($this, 'makeTimestamps'));
     $this->relation('clubs', 'away_club_id')->field('name', 'away_club')->onBeforeInsert(array($this, 'makeAbb'))->onBeforeInsert(array($this, 'makeTimestamps'));
     $this->relation('seasons', 'season_id')->field('name', 'season')->onBeforeInsert(array($this, 'makeTimestamps'));
     $this->relation('broadcasters', 'broadcaster_id')->field('name', 'broadcaster')->onBeforeInsert(array($this, 'makeTimestamps'));
     $this->on('parsed', function ($row) {
         $row['start'] = $row['date'] . ' ' . $row['time'];
         return $row;
     });
     $this->on('parsed', [$this, 'makeTimestamps']);
 }
开发者ID:jjc88,项目名称:PHP-Importer,代码行数:31,代码来源:AttendanceImport.php

示例3: __construct

 /**
  * @see Subjects::__construct()
  */
 public function __construct()
 {
     \tao_helpers_Context::load('STANDALONE_MODE');
     parent::__construct();
 }
开发者ID:nagyist,项目名称:extension-tao-testtaker,代码行数:8,代码来源:SasImport.php

示例4: __construct

 public function __construct()
 {
     parent::__construct();
     $this->layout = 'registered';
     $this->ctrlpath = 'user/' . $this->router->fetch_class();
 }
开发者ID:FaddliLWibowo,项目名称:MapIgniter,代码行数:6,代码来源:userimport.php

示例5: __construct

 public function __construct($upload_id)
 {
     parent::__construct('broadcasts', $upload_id);
     $this->string('type', '/^(CDT|OVN)$/')->position(0)->insert();
     $this->string('competition')->position(1);
     $this->string('home_club')->position(2);
     $this->string('away_club')->position(3);
     $this->string('programme_type')->position(4);
     $this->integer('timeslot_id')->position(5)->insert();
     $this->string('package', '/^[A-Z]?$/')->position(6)->insert();
     $this->date('date', 'd/m/Y')->position(7);
     $this->string('season')->position(8);
     $this->string('day')->position(9);
     $this->string('programme_title')->position(10);
     $this->string('channel')->position(11);
     $this->string('broadcaster')->position(12);
     $this->time('time', 'H:i:s')->position(13);
     $this->time('end', 'H:i:s')->position(14);
     $this->seconds('duration')->position(15)->insert();
     $this->float('aud_4_000')->position(16)->insert();
     $this->float('aud_4_tvr')->position(17)->insert();
     $this->float('aud_4_share')->position(18)->insert();
     $this->float('aud_4_peak')->position(19)->insert();
     $this->float('aud_16_34_000')->position(20)->insert();
     $this->float('aud_16_34_tvr')->position(21)->insert();
     $this->float('aud_16_34_share')->position(22)->insert();
     $this->float('aud_16_34_peak')->position(23)->insert();
     $this->float('aud_16_000')->position(24)->insert();
     $this->float('aud_16_tvr')->position(25)->insert();
     $this->float('aud_16_share')->position(26)->insert();
     $this->float('aud_16_peak')->position(27)->insert();
     $this->date('start', 'Y-m-d H:i:s')->insert();
     $this->integer('competition_id')->insert();
     $this->integer('home_club_id')->insert();
     $this->integer('away_club_id')->insert();
     $this->integer('season_id')->insert();
     $this->integer('programme_id')->insert();
     $this->integer('channel_id')->insert();
     $this->integer('upload_id')->insert();
     $this->relation('competitions', 'competition_id')->field('name', 'competition')->onBeforeInsert(array($this, 'makeAbb'))->onBeforeInsert(array($this, 'makeTimestamps'));
     $this->relation('clubs', 'home_club_id')->field('name', 'home_club')->onBeforeInsert(array($this, 'makeAbb'))->onBeforeInsert(array($this, 'makeTimestamps'));
     $this->relation('clubs', 'away_club_id')->field('name', 'away_club')->onBeforeInsert(array($this, 'makeAbb'))->onBeforeInsert(array($this, 'makeTimestamps'));
     $this->relation('seasons', 'season_id')->field('name', 'season')->onBeforeInsert(array($this, 'makeTimestamps'));
     $this->relation('programmes', 'programme_id')->field('name', 'programme_title')->field('type', 'programme_type')->onBeforeInsert(array($this, 'makeTimestamps'));
     $this->relation('channels', 'channel_id')->field('name', 'channel')->onBeforeInsert(array($this, 'makeAbb'))->onBeforeInsert(array($this, 'makeTimestamps'));
     $this->on('parsed', function ($row) {
         $row['start'] = $row['date'] . ' ' . $row['time'];
         $row['aud_4_000'] = $row['aud_4_000'] * 1000;
         $row['aud_4_tvr'] = $row['aud_4_tvr'] * 1000;
         $row['aud_4_share'] = $row['aud_4_share'] * 1000;
         $row['aud_4_peak'] = $row['aud_4_peak'] * 1000;
         $row['aud_16_34_000'] = $row['aud_16_34_000'] * 1000;
         $row['aud_16_34_tvr'] = $row['aud_16_34_tvr'] * 1000;
         $row['aud_16_34_share'] = $row['aud_16_34_share'] * 1000;
         $row['aud_16_34_peak'] = $row['aud_16_34_peak'] * 1000;
         $row['aud_16_000'] = $row['aud_16_000'] * 1000;
         $row['aud_16_tvr'] = $row['aud_16_tvr'] * 1000;
         $row['aud_16_share'] = $row['aud_16_share'] * 1000;
         $row['aud_16_peak'] = $row['aud_16_peak'] * 1000;
         return $row;
     });
     $this->on('parsed', [$this, 'makeTimestamps']);
 }
开发者ID:jjc88,项目名称:PHP-Importer,代码行数:63,代码来源:UKImport.php


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