Skip to content

Commit

Permalink
adding url and twilio initializers
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Kimsal authored and Michael Kimsal committed Jul 8, 2010
1 parent 8cd673f commit 14bee92
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions application/bootstrap.php
Expand Up @@ -36,6 +36,23 @@ public function _initView()
return $view;
}

public function _initBase()
{
// need a better way - $_SERVER data isn't available in phpunit mode - config vars?
// Zend_Registry::set("baseUrl","http://".$_SERVER['HTTP_HOST'].Zend_Controller_Front::getInstance()->getBaseUrl());
Zend_Registry::set("baseUrl","http://zfkit.com/twilio/public".Zend_Controller_Front::getInstance()->getBaseUrl());
}

public function _initTwilio()
{
$config = $this->getOption("twilio");
Zend_Registry::set("twilioBaseUrl", $config['endpoint']."/Accounts/".$config['accountSid']);
Zend_Registry::set("twilioConfig", $config);
$w = new Zend_Log_Writer_Stream($config['outlog']);
$log = new Zend_Log($w);
Zend_Registry::set("twiliolog", $log);
}

/**
* if you want true zend-framework 'rest'-style URLs
* with all that entails, uncomment this method
Expand Down

0 comments on commit 14bee92

Please sign in to comment.