| @@ 119-130 (lines=12) @@ | ||
| 116 | * @return bool |
|
| 117 | * @since $VID:$ |
|
| 118 | */ |
|
| 119 | public function hasAssetOfType($identifier, $type = Asset::TYPE_JS) |
|
| 120 | { |
|
| 121 | $this->rewind(); |
|
| 122 | while ($this->valid()) { |
|
| 123 | if ($this->getInfo() === $identifier && $this->current()->type() === $type) { |
|
| 124 | $this->rewind(); |
|
| 125 | return true; |
|
| 126 | } |
|
| 127 | $this->next(); |
|
| 128 | } |
|
| 129 | return false; |
|
| 130 | } |
|
| 131 | ||
| 132 | ||
| 133 | /** |
|
| @@ 175-188 (lines=14) @@ | ||
| 172 | * @return JavascriptAsset|StylesheetAsset |
|
| 173 | * @since $VID:$ |
|
| 174 | */ |
|
| 175 | public function getAssetOfType($identifier, $type = Asset::TYPE_JS) |
|
| 176 | { |
|
| 177 | $this->rewind(); |
|
| 178 | while ($this->valid()) { |
|
| 179 | if ($this->getInfo() === $identifier && $this->current()->type() === $type) { |
|
| 180 | /** @var JavascriptAsset|StylesheetAsset $object */ |
|
| 181 | $object = $this->current(); |
|
| 182 | $this->rewind(); |
|
| 183 | return $object; |
|
| 184 | } |
|
| 185 | $this->next(); |
|
| 186 | } |
|
| 187 | return null; |
|
| 188 | } |
|
| 189 | ||
| 190 | ||
| 191 | /** |
|