當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。