[ Index ]
 

Code source de Symfony 1.0.0

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

title

Body

[fermer]

/lib/addon/propel/builder/ -> SfExtensionPeerBuilder.php (source)

   1  <?php
   2  
   3  require_once 'propel/engine/builder/om/php5/PHP5ExtensionPeerBuilder.php';
   4  
   5  /*
   6   * This file is part of the symfony package.
   7   * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
   8   *
   9   * For the full copyright and license information, please view the LICENSE
  10   * file that was distributed with this source code.
  11   */
  12  
  13  /**
  14   * @package    symfony
  15   * @subpackage addon
  16   * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
  17   * @version    SVN: $Id: SfExtensionPeerBuilder.php 2624 2006-11-07 09:34:59Z fabien $
  18   */
  19  class SfExtensionPeerBuilder extends PHP5ExtensionPeerBuilder
  20  {
  21    protected function addIncludes(&$script)
  22    {
  23      if (!DataModelBuilder::getBuildProperty('builderAddIncludes'))
  24      {
  25        return;
  26      }
  27  
  28      parent::addIncludes($script);
  29    }
  30  
  31    /**
  32     * Adds class phpdoc comment and openning of class.
  33     * @param string &$script The script will be modified in this method.
  34     */
  35    protected function addClassOpen(&$script)
  36    {
  37      $table = $this->getTable();
  38      $tableName = $table->getName();
  39      $tableDesc = $table->getDescription();
  40  
  41      $baseClassname = $this->getPeerBuilder()->getClassname();
  42  
  43      $script .= "
  44  /**
  45   * Subclass for performing query and update operations on the '$tableName' table.
  46   *
  47   * $tableDesc
  48   *
  49   * @package ".$this->getPackage()."
  50   */ 
  51  class ".$this->getClassname()." extends $baseClassname
  52  {";
  53    }
  54  
  55    /**
  56     * Closes class.
  57     * @param string &$script The script will be modified in this method.
  58     */ 
  59    protected function addClassClose(&$script)
  60    {
  61      $script .= "
  62  }
  63  ";
  64    }
  65  }


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