Skip to content

Commit

Permalink
Fixed new views bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalyiegorov committed Feb 21, 2016
1 parent 00998af commit 54f856a
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions src/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -322,28 +322,29 @@ public function output()
// Вернем на место текущий модуль системы
$this->system->active($old);
}
} elseif (is_a($viewPath, ViewInterface::class)) {
/** @var ViewInterface $viewPath */
$out = $viewPath->output();
}

// Clear currently outputted view context from VCS
unset($this->view_data[$viewPath]);
// Clear currently outputted view context from VCS
unset($this->view_data[$viewPath]);

// Get last element from VCS
end($this->view_data);
// Get last element from VCS
end($this->view_data);

// Get last element from VCS name
$this->view_context = key($this->view_data);
// Get last element from VCS name
$this->view_context = key($this->view_data);

// Set internal view data pointer to last VCS entry
$this->data = &$this->view_data[$this->view_context];
// Set internal view data pointer to last VCS entry
$this->data = &$this->view_data[$this->view_context];

// Return view path to previous state
$this->view_path = $this->view_context;
// Return view path to previous state
$this->view_path = $this->view_context;

// Вернем результат прорисовки
return $out;
// Вернем результат прорисовки
return $out;

} elseif (is_a($viewPath, ViewInterface::class)) {
/** @var ViewInterface $viewPath */
return $viewPath->output();
}
}

/** Magic method for calling un existing object methods */
Expand Down

0 comments on commit 54f856a

Please sign in to comment.