Skip to content

Commit 65bb8df

Browse files
committed
Merge pull request #43 from akrabat/set-base-url
Allow setting of baseUrl after construction
2 parents 330a5d4 + ba7a552 commit 65bb8df

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/TwigExtension.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,15 @@ public function baseUrl()
5353
return $this->uri->getBaseUrl();
5454
}
5555
}
56+
57+
/**
58+
* Set the base url
59+
*
60+
* @param string|Slim\Http\Uri $baseUrl
61+
* @return void
62+
*/
63+
public function setBaseUrl($baseUrl)
64+
{
65+
$this->uri = $baseUrl;
66+
}
5667
}

0 commit comments

Comments
 (0)