Development

Changeset 19657

You must first sign up to be able to contribute.

Changeset 19657

Show
Ignore:
Timestamp:
06/29/09 08:50:59 (4 years ago)
Author:
fabien
Message:

[dependency_injection] fixed the conversion from a camel-cased string to underscore

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • components/dependency_injection/trunk/lib/sfServiceContainer.php

    r19656 r19657  
    356356  static public function underscore($id) 
    357357  { 
    358     return strtolower(preg_replace(array('/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/', '/_/'), array('\\1_\\2', '\\1_\\2', '.'), $id)); 
     358    return strtolower(preg_replace(array('/_/', '/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'), array('.', '\\1_\\2', '\\1_\\2'), $id)); 
    359359  } 
    360360}