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


PHP StepExecution::getId方法代码示例

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


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

示例1: extractZipArchive

 /**
  * Extract the zip archive to be imported
  *
  * @throws \RuntimeException When archive cannot be opened or extracted
  *                           or does not contain exactly one csv file
  */
 protected function extractZipArchive()
 {
     $archive = new \ZipArchive();
     $status = $archive->open($this->filePath);
     if (true !== $status) {
         throw new \RuntimeException(sprintf('Error "%d" occurred while opening the zip archive.', $status));
     } else {
         $targetDir = sprintf('%s/%s_%d_%s', pathinfo($this->filePath, PATHINFO_DIRNAME), pathinfo($this->filePath, PATHINFO_FILENAME), $this->stepExecution->getId(), md5(microtime() . $this->stepExecution->getId()));
         if ($archive->extractTo($targetDir) !== true) {
             throw new \RuntimeException('Error occurred while extracting the zip archive.');
         }
         $archive->close();
         $this->extractedPath = $targetDir;
         $csvFiles = glob($targetDir . '/*.[cC][sS][vV]');
         $csvCount = count($csvFiles);
         if (1 !== $csvCount) {
             throw new \RuntimeException(sprintf('Expecting the root directory of the archive to contain exactly 1 csv file, found %d', $csvCount));
         }
         $this->filePath = current($csvFiles);
     }
 }
开发者ID:umpirsky,项目名称:pim-community-dev,代码行数:27,代码来源:CsvReader.php

示例2: getId

 /**
  * {@inheritDoc}
  */
 public function getId()
 {
     if ($this->__isInitialized__ === false) {
         return (int) parent::getId();
     }
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getId', array());
     return parent::getId();
 }
开发者ID:aml-bendall,项目名称:ExpandAkeneoApi,代码行数:11,代码来源:__CG__AkeneoBundleBatchBundleEntityStepExecution.php

示例3: testGetId

 public function testGetId()
 {
     $this->assertNull($this->stepExecution->getId());
 }
开发者ID:xleliberty,项目名称:BatchBundle,代码行数:4,代码来源:StepExecutionTest.php


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