[ Index ]
 

Code source de Symfony 1.0.0

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/lib/vendor/propel-generator/templates/om/php5/ -> MultiExtendObject.tpl (source)

   1  <?php
   2  
   3  // Create empty stub subclass which extends the parent stub om class created in ExtensionObject.tpl.
   4  //
   5  // $Id: MultiExtendObject.tpl,v 1.2 2004/10/06 16:54:47 hlellelid Exp $
   6  
   7  echo '<' . '?' . 'php';
   8  
   9  $db = $table->getDatabase();
  10  if($table->getPackage()) {
  11      $package = $table->getPackage();
  12  } else {
  13      $package = $targetPackage;
  14  }
  15  
  16  $packagePath = strtr($package, '.', '/');
  17  if ($packagePath != "") $packagePath .= '/';
  18  
  19  if ($child->getAncestor()) {
  20      $parent = $child->getAncestor();
  21  ?> 
  22  
  23  require_once '<?php echo strtr($parent, '.', '/') ?>.php';
  24  
  25  <?php
  26      $parts = explode('.', $parent);
  27      $parentClass = array_pop($parts);
  28  } else {
  29      $parentClass = $table->getPhpName();
  30  ?> 
  31  
  32  require_once '<?php echo $packagePath . $parentClass ?>.php';
  33  <?php
  34  }
  35  ?>
  36  
  37  /** 
  38  <?php if ($addTimeStamp) { ?>
  39  
  40   * The skeleton for this class was autogenerated by Propel on:
  41   *
  42   * [<?php echo $now ?>]
  43   *
  44  <?php } ?>
  45  
  46   * You should add additional methods to this class to meet the
  47   * application requirements.  This class will only be generated as
  48   * long as it does not already exist in the output directory.
  49   */
  50  class <?php echo $child->getClassName()?> extends <?php echo $parentClass ?> {
  51  
  52      public function __construct()
  53      {   <?php
  54          $col = $child->getColumn();
  55          $cfc=$col->getPhpName();
  56          $table = $col->getTable();
  57          ?>         
  58          $this->set<?php echo $cfc ?>(<?php echo $table->getPhpName() ?>Peer::CLASSKEY_<?php echo strtoupper($child->getKey()) ?>);
  59      }
  60  }


Généré le : Fri Mar 16 22:42:14 2007 par Balluche grâce à PHPXref 0.7