Skip to content

Commit

Permalink
Add phpdoc. [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
rob006 committed Apr 26, 2017
1 parent 4dbcc78 commit 94eda9b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions framework/web/UrlRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@ public function init()
$this->preparePattern();
}

/**
* Process [[$pattern]] on rule initialization.
*/
private function preparePattern()
{
$this->pattern = $this->trimSlashes($this->pattern);
Expand Down Expand Up @@ -220,6 +223,13 @@ private function preparePattern()
$this->translatePattern(true);
}

/**
* Prepares [[$pattern]] on rule initialization - replace parameter names by placeholders.
*
* @param bool $allowAppendSlash Defines position of slash in the param pattern in [[$pattern]].
* If `false` slash will be placed at the beginning of param pattern. If `true` slash position will be detected
* depending on non-optional pattern part.
*/
private function translatePattern($allowAppendSlash)
{
$tr = [
Expand Down

0 comments on commit 94eda9b

Please sign in to comment.