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


PHP Mapper::getImplementation方法代码示例

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


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

示例1: verifySettings

 /**
  * Checks to make sure all settings are kosher. In this case, it
  * means that the dest attribute has been set and we have a mapper.
  */
 public function verifySettings()
 {
     if ($this->targetdir === null) {
         $this->setError("The targetdir attribute is required.");
     }
     if ($this->map === null) {
         if ($this->mapperElement === null) {
             $this->map = new IdentityMapper();
         } else {
             $this->map = $this->mapperElement->getImplementation();
             if ($this->map === null) {
                 $this->setError("Could not set <mapper> element.");
             }
         }
     }
 }
开发者ID:Geeklog-Japan,项目名称:geeklog-japan,代码行数:20,代码来源:MappingSelector.php

示例2: getMappedFile

 /**
  * Maps the passed in name to a new filename & returns resolved File object.
  * @param      string $from
  * @return     PhingFile Resolved File object.
  * @throws     BuilException    - if no Mapper element se
  *                          - if unable to map new filename.
  */
 protected function getMappedFile($from)
 {
     if (!$this->mapperElement) {
         throw new BuildException("This task requires you to use a <mapper/> element to describe how filename changes should be handled.");
     }
     $mapper = $this->mapperElement->getImplementation();
     $mapped = $mapper->main($from);
     if (!$mapped) {
         throw new BuildException("Cannot create new filename based on: " . $from);
     }
     // Mappers always return arrays since it's possible for some mappers to map to multiple names.
     $outFilename = array_shift($mapped);
     $outFile = new PhingFile($this->getOutputDirectory(), $outFilename);
     return $outFile;
 }
开发者ID:sensorsix,项目名称:app,代码行数:22,代码来源:AbstractPropelDataModelTask.php

示例3: addMapper

 /**
  * Add a <code>Mapper</code>.
  * @param Mapper $mapper the <code>Mapper</code> to add.
  */
 public function addMapper(Mapper $mapper)
 {
     $this->add($mapper->getImplementation());
 }
开发者ID:Ingewikkeld,项目名称:phing,代码行数:8,代码来源:ContainerMapper.php


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