예제 #1
0
 public function testSchemaFinder()
 {
     $finder = new LazyRecord\Schema\SchemaFinder();
     $finder->in('tests');
     $finder->find();
     $schemas = $finder->getSchemas();
     ok(is_array($schemas));
     foreach ($schemas as $schema) {
         ok($schema);
     }
 }
예제 #2
0
<?php

use LazyRecord\Schema\SchemaLoader;
$finder = new LazyRecord\Schema\SchemaFinder();
if ($app = kernel()->getApp()) {
    $finder->in($app->locate() . DIRECTORY_SEPARATOR . 'Model');
}
if ($bundles = kernel()->bundles) {
    foreach ($bundles as $bundle) {
        $finder->in($bundle->locate() . DIRECTORY_SEPARATOR . 'Model');
    }
}
$finder->find();
if (method_exists($finder, "getSchemas")) {
    return $finder->getSchemas();
}
return $finder;
return SchemaLoader::loadDeclaredSchemas();
예제 #3
0
<?php

$finder = new LazyRecord\Schema\SchemaFinder();
foreach (kernel()->applications as $app) {
    $finder->in($app->locate());
}
foreach (kernel()->bundles as $bundle) {
    $finder->in($bundle->locate());
}
if (file_exists('tests')) {
    $finder->in('tests');
}
$finder->find();
return $finder->getSchemas();