本文整理汇总了PHP中Zend_Filter::getAlpha方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Filter::getAlpha方法的具体用法?PHP Zend_Filter::getAlpha怎么用?PHP Zend_Filter::getAlpha使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Filter
的用法示例。
在下文中一共展示了Zend_Filter::getAlpha方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getAlpha
/**
* 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]);
}
示例2: getAlpha
/**
* 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);
}
示例3: getAlpha
/**
* Returns only the alphabetic characters in value.
*
* @param mixed $key
* @return mixed
*/
public function getAlpha($key)
{
return Zend_Filter::getAlpha($this->_source[$key]);
}
示例4: RecursiveIteratorIterator
$_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'] = "root";
$_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;