This file contains hidden or 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
<?php | |
namespace Balanced; | |
/** | |
* Bootstrapper for Balanced does autoloading and resource initialization. | |
*/ | |
class Bootstrap | |
{ | |
const DIR_SEPARATOR = DIRECTORY_SEPARATOR; |
This file contains hidden or 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
<?php | |
require_once('vendor/autoload.php'); | |
Httpful\Bootstrap::init(); | |
RESTful\Bootstrap::init(); | |
Balanced\Bootstrap::init(); | |
// Switch API key depending on config | |
$API_KEY_SECRET = | |
Mage::getStoreConfig('payment/payments/test') |
This file contains hidden or 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
// 1: how could you rewrite the following to make it shorter? | |
if (foo) { | |
bar.doSomething(el); | |
} else { | |
bar.doSomethingElse(el); | |
} | |