Removed dep on API
[ninja.git] / src / op5 / ninja_sdk / orm / ORMTableManifestGenerator.php
blob85857e90aef29b13489537b9d547aed74eaa011d
1 <?php
3 class ORMTableManifestGenerator extends class_generator {
5 private $full_structure;
7 public function __construct( $full_structure ) {
8 $this->full_structure = $full_structure;
9 $this->classname = "orm_table_classes";
10 $this->set_manifest();
13 public function generate($skip_generated_note = false) {
14 parent::generate($skip_generated_note);
16 foreach( $this->full_structure as $name => $structure ) {
17 $this->write('$manifest[%s] = %s;', $name, array(
18 'object' => $structure['class'].self::$model_suffix,
19 'set' => $structure['class'].'Set'.self::$model_suffix,
20 'pool' => $structure['class'].'Pool'.self::$model_suffix,
21 ));