Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added default config and separate routes config file
- Loading branch information
Showing
3 changed files
with
91 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?php | ||
|
||
return [ | ||
"routes" => [ | ||
[ | ||
"name" => "index", | ||
"route" => "/", | ||
"method" => "get", | ||
"handler" => "frontPage", | ||
], | ||
[ | ||
"name" => "page", | ||
"route" => "/p/:page+", | ||
"method" => "get", | ||
"handler" => "setPage", | ||
], | ||
//custom routes | ||
[ | ||
"name" => "news", | ||
"route" => "/news", | ||
"method" => "get", | ||
"handler" => "theNews", | ||
], | ||
[ | ||
"name" => "newsitem", | ||
"route" => "/n/:segments+", | ||
"method" => "get", | ||
"handler" => "newsItem", | ||
], | ||
[ | ||
"name" => "contact", | ||
"route" => "/contact", | ||
"method" => "get", | ||
"handler" => "contactForm", | ||
], | ||
[ | ||
"name" => "contactok", | ||
"route" => "/contact/ok/", | ||
"method" => "get", | ||
"handler" => "contactOk", | ||
], | ||
[ | ||
"name" => "postcontact", | ||
"route" => "/contact/:token", | ||
"method" => "post", | ||
"handler" => "contactForm", | ||
], | ||
], | ||
// define default route conditions | ||
"route.conditions" => [ | ||
'page+' => '[a-zA-Z0-9_-]+', | ||
'lang' => '[\w]{2}', | ||
], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
return [ | ||
"mode" => "development", | ||
"debug" => true, | ||
"benchmark" => true, | ||
"cache" => true, | ||
"cache.adapter" => "File", | ||
"cache.time" => 120, | ||
"cache.flush.url" => "/clearcache", | ||
"templates.path" => "./templates/skela", | ||
"class.name" => "\PHaiku\Haiku", | ||
"data.store" => "./data", | ||
"default.ext" => "html", | ||
"contact.mail"=> "", | ||
"mail.host" => "", | ||
"mail.username" => "", | ||
"mail.password" => "", | ||
"recaptcha.publickey" => "your-recaptcha-public-key", | ||
"recaptcha.privatekey" => "your-recaptcha-private-key", | ||
"multilingual" => true, | ||
"default.language" => "en", | ||
"languages" => ["sl","en"], | ||
]; | ||
|