-
Notifications
You must be signed in to change notification settings - Fork 645
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
10 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,12 +12,12 @@ | |
use Twig\Node\Node; | ||
|
||
/** | ||
* Class CacheResponseNode | ||
* Class ExpiresNode | ||
* | ||
* @author Pixel & Tonic, Inc. <[email protected]> | ||
* @since 4.10.0 | ||
*/ | ||
class CacheResponseNode extends Node | ||
class ExpiresNode extends Node | ||
{ | ||
/** | ||
* @inheritdoc | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,22 +7,22 @@ | |
|
||
namespace craft\web\twig\tokenparsers; | ||
|
||
use craft\web\twig\nodes\CacheResponseNode; | ||
use craft\web\twig\nodes\ExpiresNode; | ||
use Twig\Token; | ||
use Twig\TokenParser\AbstractTokenParser; | ||
|
||
/** | ||
* Class CacheResponse | ||
* Class ExpiresTokenParser | ||
* | ||
* @author Pixel & Tonic, Inc. <[email protected]> | ||
* @since 4.10.0 | ||
*/ | ||
class CacheResponseTokenParser extends AbstractTokenParser | ||
class ExpiresTokenParser extends AbstractTokenParser | ||
{ | ||
/** | ||
* @inheritdoc | ||
*/ | ||
public function parse(Token $token): CacheResponseNode | ||
public function parse(Token $token): ExpiresNode | ||
{ | ||
$lineno = $token->getLine(); | ||
$parser = $this->parser; | ||
|
@@ -70,14 +70,14 @@ public function parse(Token $token): CacheResponseNode | |
|
||
$stream->expect(Token::BLOCK_END_TYPE); | ||
|
||
return new CacheResponseNode($nodes, $attributes, $lineno, $this->getTag()); | ||
return new ExpiresNode($nodes, $attributes, $lineno, $this->getTag()); | ||
} | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
public function getTag(): string | ||
{ | ||
return 'cacheResponse'; | ||
return 'expires'; | ||
} | ||
} |