mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 14:26:54 +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;
|
namespace yii\web;
|
||||||
|
|
||||||
use ArrayIterator;
|
|
||||||
use Yii;
|
use Yii;
|
||||||
use yii\base\BaseObject;
|
use yii\base\BaseObject;
|
||||||
|
|
||||||
@ -15,7 +14,7 @@ use yii\base\BaseObject;
|
|||||||
* HeaderCollection is used by [[Response]] to maintain the currently registered HTTP headers.
|
* 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 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.
|
* is read-only.
|
||||||
*
|
*
|
||||||
* @author Qiang Xue <qiang.xue@gmail.com>
|
* @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.
|
* Returns an iterator for traversing the headers in the collection.
|
||||||
* This method is required by the SPL interface [[\IteratorAggregate]].
|
* This method is required by the SPL interface [[\IteratorAggregate]].
|
||||||
* It will be implicitly called when you use `foreach` to traverse the collection.
|
* 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()
|
public function getIterator()
|
||||||
{
|
{
|
||||||
return new ArrayIterator($this->_headers);
|
return new \ArrayIterator($this->_headers);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user