Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fixes coding standards problem with ElggViewService #5243

Merged
merged 1 commit into from

2 participants

@Srokap
Owner

No description provided.

@cash

access private only needs to added to public functions. I will pull this in and then fix.

@cash cash merged commit e3ed4f5 into Elgg:master
@Srokap Srokap deleted the Srokap:coding_standards branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 11 additions and 5 deletions.
  1. +11 −5 engine/classes/ElggViewService.php
View
16 engine/classes/ElggViewService.php
@@ -264,7 +264,7 @@ public function renderView($view, array $vars = array(), $bypass = false, $viewt
$content = '';
foreach ($viewlist as $priority => $view) {
try {
- $content .= $this->renderView_($view, $vars, $viewtype);
+ $content .= $this->renderViewFile($view, $vars, $viewtype);
continue;
} catch (Exception $e) {
$this->logger->log($e->getMessage(), 'NOTICE');
@@ -273,7 +273,7 @@ public function renderView($view, array $vars = array(), $bypass = false, $viewt
// attempt to load default view
if ($viewtype !== 'default' && $this->doesViewtypeFallback($viewtype)) {
try {
- $content .= $this->renderView_($view, $vars, 'default');
+ $content .= $this->renderViewFile($view, $vars, 'default');
} catch (Exception $e) {
$this->logger->log($e->getMessage(), 'NOTICE');
}
@@ -310,10 +310,16 @@ protected function fileExists($path) {
}
/**
- * @todo document
- * @todo change name
+ * Includes view PHP file
+ *
+ * @param string $view
+ * @param array $vars
+ * @param string $viewtype
+ * @throws Exception
+ * @return string output generated by view file inclusion
+ * @access private
*/
- private function renderView_($view, array $vars, $viewtype) {
+ private function renderViewFile($view, array $vars, $viewtype) {
$view_location = $this->getViewLocation($view, $viewtype);
if ($this->fileExists("{$view_location}$viewtype/$view.php")) {
Something went wrong with that request. Please try again.