Example #1
0
 /**
  * Returns only the alphabetic characters in value.
  *
  * @param mixed $key
  * @return mixed
  */
 public function getAlpha($key)
 {
     if (!$this->keyExists($key)) {
         return false;
     }
     return Zend_Filter::getAlpha($this->_source[$key]);
 }
Example #2
0
 /**
  * Returns only the alphabetic characters in value.
  *
  * @param mixed $key
  * @return mixed
  */
 public function getAlpha($key = null)
 {
     if (!($value = $this->keyExists($key))) {
         return false;
     }
     return Zend_Filter::getAlpha($value);
 }
Example #3
0
 /**
  * Returns only the alphabetic characters in value.
  *
  * @param mixed $key
  * @return mixed
  */
 public function getAlpha($key)
 {
     return Zend_Filter::getAlpha($this->_source[$key]);
 }
Example #4
0
$_consts['APP_VIEW_TMP_DIR'] = $_consts['APP_TMP_DIR'] . "/views_c";
$_consts['APP_PLUGINS_DIR'] = $_consts['APP_INC_DIR'] . "/plugins";
$_consts['APP_VIEW_PLUGINS_DIR'] = $_consts['APP_PLUGINS_DIR'] . "/view";
$_consts['APP_CFG_DIR'] = $_consts['APP_INC_DIR'] . "/config";
$_consts['CONTROLLER_DIR'] = $_consts['APP_INC_DIR'] . "/controllers";
$_consts['APP_CACHE_TMP_DIR'] = $_consts['APP_TMP_DIR'] . "/cache";
$_consts['DB_USERNAME'] = "******";
$_consts['DB_PASSWORD'] = "";
$_consts['DB_DSN'] = "mysql:host=localhost;dbname=%s";
ini_set("include_path", "{$_consts['ZLIB_INC_DIR']}:.");
require_once "Zend/Filter.php";
if (empty($_SERVER['argv'][1])) {
    print_usage();
} else {
    $filter = new Zend_Filter();
    $_consts['APPNAME'] = $filter->getAlpha($_SERVER['argv'][1]);
}
$it = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($_consts['BASEDIR']));
foreach ($it as $filename) {
    if (!is_file($filename)) {
        continue;
    }
    $file = file_get_contents($filename);
    $filename_demangled = $filename;
    foreach ($_consts as $constant => $value) {
        $file = str_replace("%{$constant}%", $value, $file);
        $filename_demangled = str_replace("%{$constant}%", $value, $filename_demangled);
    }
    if (strcmp($filename, $filename_demangled) != 0) {
        @unlink($filename);
        $filename = $filename_demangled;