Skip to content

Commit

Permalink
clean ttfb
Browse files Browse the repository at this point in the history
  • Loading branch information
HillLiu committed Sep 17, 2022
1 parent 38ee76f commit 65e498e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 27 deletions.
26 changes: 0 additions & 26 deletions src/ActionForward.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,6 @@ class ActionForward extends HashMap
*/
public $action;

/**
* TTFB.
*
* @var bool
*/
public $ttfb;

/**
* ActionForward.
*
Expand All @@ -130,9 +123,6 @@ public function __construct($forward)

// assign value
$this->action = $forward[_ACTION];
if (isset($forward[_TTFB])) {
$this->ttfb = $forward[_TTFB];
}
}

/**
Expand All @@ -147,7 +137,6 @@ function () {
return [
'name' => $this->name,
'action' => $this->action,
'ttfb' => $this->ttfb,
'header' => $this->getHeader(),
'type' => $this->getType(),
'path' => $this->getPath(),
Expand Down Expand Up @@ -404,21 +393,6 @@ private function _processView()
*/
$view = $this->_view;

// <-- Handle ttfb
// Need locate before setThemePath
// else path will be clean by $view->enable
if ($this->ttfb) {
$view[_TTFB] = true;
$view['reEnable'] = true;
$view->disable();
} else {
if (!empty($view['reEnable'])) {
unset($view['reEnable']);
$view->enable();
}
}
// end Handle ttfb-->

if ('redirect' !== $this->_type) {
$path = $this->getPath();
if (is_null($path)) {
Expand Down
1 change: 0 additions & 1 deletion src/Constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
define('_HEADER', '_header_');
define('_PATH', '_path_');
define('_TYPE', '_type_');
define('_TTFB', '_ttfb_');
define('_FORWARD', '_forward_');
define('_ERROR_FORWARD', '_error_forward_');

Expand Down

0 comments on commit 65e498e

Please sign in to comment.