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


PHP PropelQuickBuilder::buildClasses方法代码示例

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


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

示例1: assertEmptyBuilderOutput

 protected function assertEmptyBuilderOutput($schema)
 {
     $builder = new PropelQuickBuilder();
     $builder->setSchema($schema);
     ob_start();
     $builder->buildClasses();
     $output = preg_replace('/[\\r\\n]/', '', ob_get_contents());
     ob_end_clean();
     $this->assertEquals('', $output);
 }
开发者ID:thehereward,项目名称:Propel,代码行数:10,代码来源:GeneratedObjectConstantNameTest.php

示例2: setUp

    public function setUp()
    {
        if (!class_exists('Foo\\MyClassWithInterface')) {
            $schema = <<<EOF
<database name="a-database" namespace="Foo">
\t<table name="my_class_with_interface" interface="MyInterface">
\t\t<column name="id" required="true" primaryKey="true" autoIncrement="true" type="INTEGER" />
\t\t<column name="name" type="VARCHAR" />
\t</table>
</database>
EOF;
            $builder = new PropelQuickBuilder();
            $builder->setSchema($schema);
            $builder->buildClasses();
        }
    }
开发者ID:shelsonjava,项目名称:datawrapper,代码行数:16,代码来源:GeneratedObjectWithInterfaceTest.php

示例3: testDoInsert

    /**
     * @expectedException PropelException
     */
    public function testDoInsert()
    {
        if (!class_exists('Unexistent')) {
            $schema = <<<EOF
<database name="a-database">
    <table name="unexistent">
        <column name="id" required="true" primaryKey="true" autoIncrement="true" type="INTEGER" />
        <column name="name" type="VARCHAR" />
    </table>
</database>
EOF;
            $builder = new PropelQuickBuilder();
            $builder->setSchema($schema);
            $builder->buildClasses();
        }
        $object = new Unexistent();
        $object->setName('Foo');
        $object->save();
        $this->fail('Should not be called');
    }
开发者ID:dracony,项目名称:forked-php-orm-benchmark,代码行数:23,代码来源:GeneratedObjectTest.php

示例4:

<?php

/*
 * This file is part of the FOSUserBundle package.
 *
 * (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
if (!is_file($autoloadFile = __DIR__ . '/../vendor/autoload.php')) {
    throw new \LogicException('Could not find autoload.php in vendor/. Did you run "composer install --dev"?');
}
require $autoloadFile;
if (class_exists('Propel')) {
    set_include_path(__DIR__ . '/../vendor/phing/phing/classes' . PATH_SEPARATOR . get_include_path());
    $class = new \ReflectionClass('TypehintableBehavior');
    $builder = new \PropelQuickBuilder();
    $builder->getConfig()->setBuildProperty('behavior.typehintable.class', $class->getFileName());
    $builder->setSchema(file_get_contents(__DIR__ . '/../Resources/config/propel/schema.xml'));
    $builder->buildClasses();
}
开发者ID:nucleartux,项目名称:NmnMultiUserBundle,代码行数:22,代码来源:bootstrap.php


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