Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Jorge Alcalá
Added: Apr 20, 2021 9:52 PM
Views: 12
Tags: no tags
  1.     //return is_string($value) ? preg_replace('/%(.+?)%/e', 'sfConfig::has(strtolower("\\1")) ? sfConfig::get(strtolower("\\1")) : "%\\1%"', $value) : $value;
  2.         return is_string($value) ? preg_replace_callback('/%(.+?)%/', function($cad){ return sfConfig::has(strtolower($cad[1])) ? sfConfig::get(strtolower($cad[1])) : '%'. $cad[1] . '%';}, $value) : $value;