Development

Changeset 4905

You must first sign up to be able to contribute.

Changeset 4905

Show
Ignore:
Timestamp:
08/26/07 08:52:40 (2 years ago)
Author:
fabien
Message:

fixed dumping Propel data to multiple files

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/addon/propel/sfPropelData.class.php

    r4835 r4905  
    325325        } 
    326326 
    327         file_put_contents(sprintf("%s/%03d-%s.yml", $directory_or_file, ++$i, $tableName), Spyc::YAMLDump($dumpData[$tableName])); 
     327        file_put_contents(sprintf("%s/%03d-%s.yml", $directory_or_file, ++$i, $tableName), Spyc::YAMLDump(array($tableName => $dumpData[$tableName])); 
    328328      } 
    329329    } 
  • trunk/lib/view/sfMailView.class.php

    r4603 r4905  
    1616 * @version    SVN: $Id$ 
    1717 */ 
    18 class sfMailView extends sfPHPView 
     18class sfMailView extends sfView 
    1919{ 
    2020  /** 
    21    * Retrieves the template engine associated with this view. 
    22    * 
    23    * @return string sfMail 
     21   * Executes any presentation logic for this view. 
    2422   */ 
    25   public function getEngine() 
     23  public function execute() 
    2624  { 
    27     return 'sfMail'; 
    2825  } 
    2926 
  • trunk/lib/view/sfPHPView.class.php

    r4885 r4905  
    3030   * Load core and standard helpers to be use in the template. 
    3131   */ 
    32   protected function loadCoreAndStandardHelpers() 
     32  protected function loadHelpers() 
    3333  { 
    3434    static $coreHelpersLoaded = 0; 
     
    4545    $helpers = array_unique(array_merge($core_helpers, $standard_helpers)); 
    4646    sfLoader::loadHelpers($helpers); 
    47   } 
    48  
    49   /** 
    50    * Renders the presentation. 
    51    * 
    52    * @param string Filename 
    53    * 
    54    * @return string File content 
    55    */ 
    56   protected function renderFile($_sfFile) 
    57   { 
    58     if (sfConfig::get('sf_logging_enabled')) 
    59     { 
    60       $this->context->getLogger()->info(sprintf('{sfView} render "%s"', $_sfFile)); 
    61     } 
    62  
    63     $this->loadCoreAndStandardHelpers(); 
    64  
    65     extract($this->attributeHolder->toArray()); 
    66  
    67     // render 
    68     ob_start(); 
    69     ob_implicit_flush(0); 
    70     require($_sfFile); 
    71  
    72     return ob_get_clean(); 
    73   } 
    74  
    75   /** 
    76    * Retrieves the template engine associated with this view. 
    77    * 
    78    * Note: This will return null because PHP itself has no engine reference. 
    79    * 
    80    * @return null 
    81    */ 
    82   public function getEngine() 
    83   { 
    84     return null; 
    8547  } 
    8648 
     
    10769      $this->setDirectory(sfLoader::getTemplateDir($this->moduleName, $this->getTemplate())); 
    10870    } 
     71 
     72    $this->loadHelpers(); 
    10973  } 
    11074 
  • trunk/lib/view/sfPartialView.class.php

    r4562 r4905  
    1616 * @version    SVN: $Id$ 
    1717 */ 
    18 class sfPartialView extends sfPHPView 
     18class sfPartialView extends sfView 
    1919{ 
    2020  /** 
  • trunk/lib/view/sfView.class.php

    r4898 r4905  
    135135 
    136136  /** 
    137    * Retrieves the template engine associated with this view. 
    138    * 
    139    * Note: This will return null for PHPView instances. 
    140    * 
    141    * @return mixed A template engine instance 
    142    */ 
    143   abstract function getEngine(); 
    144  
    145   /** 
    146137   * Retrieves this views template. 
    147138   * 

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting.
Sensio Labs also supports several large Open-Source projects.