-
Notifications
You must be signed in to change notification settings - Fork 1
/
bootstrap.php
29 lines (25 loc) · 1.12 KB
/
bootstrap.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
class StriperBootstrap extends \Dsc\Bootstrap
{
protected $dir = __DIR__;
protected $namespace = 'Striper';
protected function runAdmin()
{
$settings = \Striper\Models\Settings::fetch();
// Set your secret key: remember to change this to your live secret key in production
// See your keys here https://manage.stripe.com/account
\Stripe\Stripe::setApiKey($settings->{$settings->mode.'.secret_key'});
\Dsc\System::instance()->get('theme')->registerViewPath($this->dir .'/src/Striper/Site/Views', 'Striper/Site/Views' );
parent::runAdmin();
}
protected function runSite()
{
\Dsc\System::instance()->get('theme')->registerViewPath($this->dir .'/src/Striper/Site/Views', 'Striper/Site/Views' );
$settings = \Striper\Models\Settings::fetch();
// Set your secret key: remember to change this to your live secret key in production
// See your keys here https://manage.stripe.com/account
\Stripe\Stripe::setApiKey($settings->{$settings->mode.'.secret_key'});
parent::runSite();
}
}
$app = new StriperBootstrap();