Beispiel #1
0
 /**
  * Debug: Print out all class maps in the factory
  */
 function _cmfToString(epClassMapFactory $cmf)
 {
     $s = '';
     $cms = $cmf->allMade();
     ksort($cms);
     foreach ($cms as $cm) {
         $s .= 'class: ' . $cm->getName() . epNewLine();
         $fms = $cm->getAllFields();
         ksort($fms);
         foreach ($fms as $fm) {
             $s .= '  field: ' . $fm->getName() . epNewLine();
         }
     }
     return $s;
 }
 /**
  * Create all tables for classes mapped so far
  * (This method may be useful if you want to create tables all at once)
  * @return false|array (of classes for which tables are created)
  * @access public
  */
 public function createTables()
 {
     // if class map factory does not exist yet
     if (!$this->cmf) {
         // initialize
         $this->initialize(true);
     }
     // go through all classes mapped
     $class_tables = array();
     if ($cms = $this->cmf->allMade()) {
         foreach ($cms as $cm) {
             if ($this->_getDb($cm->getName(), $cm)) {
                 $class_tables[$cm->getName()] = $cm;
             }
         }
     }
     return $class_tables;
 }