Changeset 1082 for trunk/runtime

Show
Ignore:
Timestamp:
09/17/08 14:11:31 (3 months ago)
Author:
tony
Message:

Refs #683: Added support for PHP 5.3 namespaces

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk

    • Property svn:ignore set to
      .project
      .cache
      .settings
  • trunk/runtime/classes/propel/map/TableMap.php

    r1024 r1082  
    331331 
    332332                if ($fkTable && $fkColumn) { 
    333                        if (substr($fkColumn, '.') > 0 && substr($fkColumn, $fkTable) !== false) { 
     333                        if (stristr($fkColumn, '.') && strstr($fkColumn, $fkTable)) { 
    334334                                $fkColumn = substr($fkColumn, strlen($fkTable) + 1); 
    335335                        } 
  • trunk/runtime/classes/propel/util/BasePeer.php

    r1068 r1082  
    3131 * @author     Hans Lellelid <hans@xmpl.org> (Propel) 
    3232 * @author     Kaspars Jaudzems <kaspars.jaudzems@inbox.lv> (Propel) 
     33 * @author     Tony Bibbs <tony@tonybibbs.com> (Propel) 
    3334 * @author     Heltem <heltem@o2php.com> (Propel) 
    3435 * @author     Frank Y. Kim <frank.kim@clearink.com> (Torque) 
     
    8384 
    8485                $peerclass = 'Base' . $classname . 'Peer'; // TODO is this always true? 
     86                $config = Propel::getConfiguration(); 
     87                if ($config['namespaces']['enabled'] == 1) { 
     88                    $peerclass = $config['namespaces']['peer']['value'] . '::' . $peerclass; 
     89                } 
    8590                $callable = array($peerclass, 'getFieldnames'); 
    8691                $args = array($type); 
     
    9499 
    95100                $peerclass = 'Base' . $classname . 'Peer'; // TODO is this always true? 
     101                $config = Propel::getConfiguration(); 
     102                if ($config['namespaces']['enabled'] == 1) { 
     103                    $peerclass = $config['namespaces']['peer']['value'] . '::' . $peerclass; 
     104                } 
    96105                $callable = array($peerclass, 'translateFieldname'); 
    97106                $args = array($fieldname, $fromType, $toType); 
  • trunk/runtime/classes/propel/validator/UniqueValidator.php

    r1068 r1082  
    5151 
    5252                $table = $column->getTable()->getPhpName(); 
    53  
     53                $config = Propel::getConfiguration(); 
    5454                $clazz = $table . 'Peer'; 
     55                if ($config[namespaces][enabled] ==  1) { 
     56                    $clazz = $config[namespaces][peer][value] . '::' . $clazz; 
     57                } 
    5558                $count = call_user_func(array($clazz, 'doCount'), $c); 
    5659