本文整理匯總了PHP中Inspekt::getAlnum方法的典型用法代碼示例。如果您正苦於以下問題:PHP Inspekt::getAlnum方法的具體用法?PHP Inspekt::getAlnum怎麽用?PHP Inspekt::getAlnum使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Inspekt
的用法示例。
在下文中一共展示了Inspekt::getAlnum方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getAlnum
/**
* Returns only the alphabetic characters and digits in value.
*
* @param mixed $key
* @return mixed
*
* @tag filter
*/
function getAlnum($key)
{
if (!$this->keyExists($key)) {
return false;
}
return Inspekt::getAlnum($this->_getValue($key));
}
示例2: testGetAlnum
/**
* Generated from @assert ('1)@*(&UR)HQ)W(*(HG))') === '1URHQWHG'.
*/
public function testGetAlnum()
{
$this->assertSame('1URHQWHG', Inspekt::getAlnum('1)@*(&UR)HQ)W(*(HG))'));
}
示例3: foreach
<?php
/**
* Demonstration of:
* - use of static filter methods on arrays
* - creating a cage on an arbitrary array
* - Accessing cage param via array syntax
*/
require_once '../Inspekt.php';
$_GET['locale'] = "en_US";
$_GET['new'] = 1;
$_GET['time'] = 1246233204.5486;
$_GET['id'] = 7444632820.0;
$_GET['key'] = "2.Hhun0mQ4KF1BfJ_WfeBB3Q__.86400.1246320000-714446282";
$_GET['ss'] = "un4SUm022i5sZ5iIZeNYWQ__";
$_GET['somestuff'] = "i, would, like, some, milk, and__cookies--please!";
$getCage = Inspekt::makeGetCage();
echo "\n<pre>All the cage params:\n\n";
foreach ($getCage as $key => $value) {
var_dump($key);
var_dump($value);
var_dump($getCage->getAlpha($key));
echo "\n";
}
echo 'Accessing cage param via array syntax "$getCage[\'locale\']" :: ' . Inspekt::getAlnum($getCage['locale']);
echo "\n</pre>\n";
示例4: getAlnum
/**
* Returns only the alphabetic characters and digits in value.
*
* @param mixed $key
* @return mixed
* @throws Exception
* @tag filter
*/
public function getAlnum($key)
{
return Inspekt::getAlnum($this->getValue($key));
}