Development

Changeset 10885 for plugins/sfPropelAlternativeSchemaPlugin

You must first sign up to be able to contribute.

Show
Ignore:
Timestamp:
08/14/08 12:09:27 (3 months ago)
Author:
francois
Message:

sfPropelAlternativeSchemaPlugin Readding builder patch since the bug is still not fixed in symfony 1.0

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfPropelAlternativeSchemaPlugin/lib/SfAlternativePeerBuilder.php

    r8162 r10885  
    4040    } 
    4141  } 
     42 
     43// TEMPORARY : remove these when bug #1585 and #2310 are solved 
     44  protected function addDoSelectJoin(&$script) 
     45  { 
     46    $tmp = ''; 
     47    parent::addDoSelectJoin($tmp); 
     48 
     49    if (DataModelBuilder::getBuildProperty('builderAddBehaviors')) 
     50    { 
     51      $mixer_script = " 
     52 
     53    foreach (sfMixer::getCallables('{$this->getClassname()}:doSelectJoin:doSelectJoin') as \$callable) 
     54    { 
     55      call_user_func(\$callable, '{$this->getClassname()}', \$c, \$con); 
     56    } 
     57 
     58"; 
     59      $tmp = preg_replace('/public static function doSelectJoin.*\(Criteria \$c, \$con = null\)\n\s*{/', '\0'.$mixer_script, $tmp); 
     60    } 
     61 
     62    $script .= $tmp; 
     63  } 
     64   
     65  protected function addDoSelectJoinAllExcept(&$script) 
     66  { 
     67    $tmp = ''; 
     68    parent::addDoSelectJoinAllExcept($tmp); 
     69 
     70    if (DataModelBuilder::getBuildProperty('builderAddBehaviors')) 
     71    { 
     72      $mixer_script = " 
     73 
     74    foreach (sfMixer::getCallables('{$this->getClassname()}:doSelectJoinAllExcept:doSelectJoinAllExcept') as \$callable) 
     75    { 
     76      call_user_func(\$callable, '{$this->getClassname()}', \$c, \$con); 
     77    } 
     78 
     79"; 
     80      $tmp = preg_replace('/public static function doSelectJoinAllExcept.*\(Criteria \$c, \$con = null\)\n\s*{/', '\0'.$mixer_script, $tmp); 
     81    } 
     82 
     83    $script .= $tmp; 
     84  } 
     85 
     86  protected function addDoSelectJoinAll(&$script) 
     87  { 
     88    $tmp = ''; 
     89    parent::addDoSelectJoinAll($tmp); 
     90 
     91    if (DataModelBuilder::getBuildProperty('builderAddBehaviors')) 
     92    { 
     93      $mixer_script = " 
     94 
     95    foreach (sfMixer::getCallables('{$this->getClassname()}:doSelectJoinAll:doSelectJoinAll') as \$callable) 
     96    { 
     97      call_user_func(\$callable, '{$this->getClassname()}', \$c, \$con); 
     98    } 
     99 
     100"; 
     101      $tmp = preg_replace('/{/', '{'.$mixer_script, $tmp, 1); 
     102    } 
     103 
     104    $script .= $tmp; 
     105  } 
     106 
     107  protected function addDoSelectRS(&$script) 
     108  { 
     109    $tmp = ''; 
     110    parent::addDoSelectRS($tmp); 
     111 
     112    if (DataModelBuilder::getBuildProperty('builderAddBehaviors')) 
     113    { 
     114      $mixer_script = " 
     115 
     116    foreach (sfMixer::getCallables('{$this->getClassname()}:doSelectRS:doSelectRS') as \$callable) 
     117    { 
     118      call_user_func(\$callable, '{$this->getClassname()}', \$criteria, \$con); 
     119    } 
     120 
     121"; 
     122      $tmp = preg_replace('/{/', '{'.$mixer_script, $tmp, 1); 
     123    } 
     124 
     125    $script .= $tmp; 
     126  } 
     127// TEMPORARY 
     128 
    42129}