mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 06:15:19 +08:00
Use PHP core classes right from root namespace without importing for the sake of clarity
This commit is contained in:

committed by
Alexander Makarov

parent
0ee17dcb7d
commit
8beb36c94f
@ -7,7 +7,6 @@
|
||||
|
||||
namespace yii\web;
|
||||
|
||||
use ArrayIterator;
|
||||
use Yii;
|
||||
use yii\base\BaseObject;
|
||||
|
||||
@ -15,7 +14,7 @@ use yii\base\BaseObject;
|
||||
* HeaderCollection is used by [[Response]] to maintain the currently registered HTTP headers.
|
||||
*
|
||||
* @property int $count The number of headers in the collection. This property is read-only.
|
||||
* @property ArrayIterator $iterator An iterator for traversing the headers in the collection. This property
|
||||
* @property \ArrayIterator $iterator An iterator for traversing the headers in the collection. This property
|
||||
* is read-only.
|
||||
*
|
||||
* @author Qiang Xue <qiang.xue@gmail.com>
|
||||
@ -33,11 +32,11 @@ class HeaderCollection extends BaseObject implements \IteratorAggregate, \ArrayA
|
||||
* Returns an iterator for traversing the headers in the collection.
|
||||
* This method is required by the SPL interface [[\IteratorAggregate]].
|
||||
* It will be implicitly called when you use `foreach` to traverse the collection.
|
||||
* @return ArrayIterator an iterator for traversing the headers in the collection.
|
||||
* @return \ArrayIterator an iterator for traversing the headers in the collection.
|
||||
*/
|
||||
public function getIterator()
|
||||
{
|
||||
return new ArrayIterator($this->_headers);
|
||||
return new \ArrayIterator($this->_headers);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user