CC-2166: Packaging Improvements. Moved the Zend app into airtime_mvc. It is now installed to /var/www/airtime. Storage is now set to /srv/airtime/stor. Utils are now installed to /usr/lib/airtime/utils/. Added install/airtime-dircheck.php as a simple test to see if everything is install/uninstalled correctly.
This commit is contained in:
parent
514777e8d2
commit
b11cbd8159
4546 changed files with 138 additions and 51 deletions
|
@ -0,0 +1,68 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Propel package.
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* @license MIT License
|
||||
*/
|
||||
|
||||
require_once 'task/PropelDataModelTemplateTask.php';
|
||||
require_once 'builder/om/ClassTools.php';
|
||||
|
||||
/**
|
||||
* This Task creates the OM classes based on the XML schema file.
|
||||
*
|
||||
* @author Hans Lellelid <hans@xmpl.org>
|
||||
* @package propel.generator.task
|
||||
*/
|
||||
class PropelDataDTDTask extends PropelDataModelTemplateTask
|
||||
{
|
||||
|
||||
public function main()
|
||||
{
|
||||
// check to make sure task received all correct params
|
||||
$this->validate();
|
||||
|
||||
if (!$this->mapperElement) {
|
||||
throw new BuildException("You must use a <mapper/> element to describe how names should be transformed.");
|
||||
}
|
||||
|
||||
$basepath = $this->getOutputDirectory();
|
||||
|
||||
// Get new Capsule context
|
||||
$generator = $this->createContext();
|
||||
$generator->put("basepath", $basepath); // make available to other templates
|
||||
|
||||
// we need some values that were loaded into the template context
|
||||
$basePrefix = $generator->get('basePrefix');
|
||||
$project = $generator->get('project');
|
||||
|
||||
foreach ($this->getDataModels() as $dataModel) {
|
||||
|
||||
$this->log("Processing Datamodel : " . $dataModel->getName());
|
||||
|
||||
foreach ($dataModel->getDatabases() as $database) {
|
||||
|
||||
$outFile = $this->getMappedFile($dataModel->getName());
|
||||
|
||||
$generator->put("tables", $database->getTables());
|
||||
$generator->parse("data/dtd/dataset.tpl", $outFile->getAbsolutePath());
|
||||
|
||||
$this->log("Generating DTD for database: " . $database->getName());
|
||||
$this->log("Creating DTD file: " . $outFile->getPath());
|
||||
|
||||
foreach ($database->getTables() as $tbl) {
|
||||
$this->log("\t + " . $tbl->getName());
|
||||
$generator->put("table", $tbl);
|
||||
$generator->parse("data/dtd/table.tpl", $outFile->getAbsolutePath(), true);
|
||||
}
|
||||
|
||||
} // foreach database
|
||||
|
||||
} // foreach dataModel
|
||||
|
||||
|
||||
} // main()
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue