本文整理匯總了PHP中FilterIterator::valid方法的典型用法代碼示例。如果您正苦於以下問題:PHP FilterIterator::valid方法的具體用法?PHP FilterIterator::valid怎麽用?PHP FilterIterator::valid使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類FilterIterator
的用法示例。
在下文中一共展示了FilterIterator::valid方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: isValid
/**
* True when the current element is valid
* @return boolean
*/
public function isValid()
{
if (parent::valid()) {
$current = $this->current();
$no = array('all-wcprops', 'svn-base');
$c1 = strpos($current->getPathname(), $no[0]) === false;
$c2 = strpos($current->getPathname(), 'svn') === false;
$c3 = strpos($current->getPathname(), 'php') !== false;
return $c1 && $c2 && $c3;
} else {
return false;
}
}
開發者ID:Teino1978-Corp,項目名稱:Teino1978-Corp-flickr_.idea_.name,代碼行數:17,代碼來源:flickr_web_app_classes_AutoLoader.php
示例2: valid
/**
*
*/
function valid()
{
return parent::valid() && ($this->limit == 0 || $this->count <= $this->limit);
}
示例3: current
public function current() {
$this->init();
if ( parent::valid() ) {
return $this->cache['current'];
} else {
return null; // out of range
}
}
示例4: valid
public function valid()
{
echo "valid(), ";
return parent::valid();
}
示例5: valid
/** @return whether the current element is valid
* which can only happen once per iteration.
*/
function valid()
{
return !$this->done && parent::valid();
}