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


PHP OMBuilder::getClassname方法代码示例

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


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

示例1: build

 /**
  * Uses a builder class to create the output class.
  * This method assumes that the DataModelBuilder class has been initialized with the build properties.
  * @param      OMBuilder $builder
  * @param      boolean $overwrite Whether to overwrite existing files with te new ones (default is YES).
  * @todo       -cPropelOMTask Consider refactoring build() method into AbstractPropelDataModelTask (would need to be more generic).
  */
 protected function build(OMBuilder $builder, $overwrite = true)
 {
     $path = $builder->getClassFilePath();
     $this->ensureDirExists(dirname($path));
     $_f = new PhingFile($this->getOutputDirectory(), $path);
     // skip files already created once
     if ($_f->exists() && !$overwrite) {
         $this->log("\t\t-> (exists) " . $builder->getClassname(), Project::MSG_VERBOSE);
         return 0;
     }
     $script = $builder->build();
     foreach ($builder->getWarnings() as $warning) {
         $this->log($warning, Project::MSG_WARN);
     }
     // skip unchanged files
     if ($_f->exists() && $script == $_f->contents()) {
         $this->log("\t\t-> (unchanged) " . $builder->getClassname(), Project::MSG_VERBOSE);
         return 0;
     }
     // write / overwrite new / changed files
     $this->log("\t\t-> " . $builder->getClassname() . " [builder: " . get_class($builder) . "]");
     file_put_contents($_f->getAbsolutePath(), $script);
     return 1;
 }
开发者ID:dracony,项目名称:forked-php-orm-benchmark,代码行数:31,代码来源:PropelOMTask.php

示例2: build

 /**
  * Uses a builder class to create the output class.
  * This method assumes that the DataModelBuilder class has been initialized with the build properties.
  * @param      OMBuilder $builder
  * @param      boolean $overwrite Whether to overwrite existing files with te new ones (default is YES).
  * @todo       -cPropelOMTask Consider refactoring build() method into AbstractPropelDataModelTask (would need to be more generic).
  */
 protected function build(OMBuilder $builder, $overwrite = true)
 {
     $path = $builder->getClassFilePath();
     $this->ensureDirExists(dirname($path));
     $_f = new PhingFile($this->getOutputDirectory(), $path);
     if ($overwrite || !$_f->exists()) {
         $this->log("\t\t-> " . $builder->getClassname() . " [builder: " . get_class($builder) . "]");
         $script = $builder->build();
         file_put_contents($_f->getAbsolutePath(), $script);
         foreach ($builder->getWarnings() as $warning) {
             $this->log($warning, Project::MSG_WARN);
         }
     } else {
         $this->log("\t\t-> (exists) " . $builder->getClassname());
     }
 }
开发者ID:nhemsley,项目名称:propel,代码行数:23,代码来源:PropelOMTask.php

示例3: getRealClassname

 public function getRealClassname()
 {
     return parent::getClassname();
 }
开发者ID:emiliomg,项目名称:PropelProviderBehavior,代码行数:4,代码来源:ProviderBaseBehaviorBuilder.php


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