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
$client = $this->getServiceLocator()->get('PaypalAdaptiveHttpClient'); | |
$client->setUri($this->getConfig()['url'] . '/' . $name); | |
$client->setParameterPost($queryParams); | |
$httpResponse = $client->send(); | |
return json_decode($httpResponse->getBody()); |
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
<?php | |
namespace Pledgevine\Db; | |
use Zend\Db\Sql\Select; | |
use Zend\Db\TableGateway\AbstractTableGateway; | |
//works exactly like a table gateway except it wont throw exceptions if you havent specified a table | |
//notice the lines are just commented | |
// |
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
<?php | |
namespace Pledgevine\Db; | |
use Zend\Db\Sql\Select; | |
use Zend\Db\TableGateway\AbstractTableGateway; | |
//works exactly like a table gateway except it wont throw exceptions if you havent specified a table | |
//notice the lines are just commented | |
// |
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
public function getMobileDeviceType() | |
{ | |
//get the detector | |
$detect = new \Detection\MobileDetect(); | |
$type = false; | |
if ($detect->isMobile()) { | |
$type = "phone"; | |
if ($detect->isTablet()) { | |
$type = "tablet"; |
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
public function getMobileDeviceType() | |
{ | |
//get the detector | |
$detect = new \Detection\MobileDetect(); | |
$type = false; | |
if ($detect->isMobile()) { | |
$type = "phone"; | |
if ($detect->isTablet()) { | |
$type = "tablet"; |
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
<?php | |
namespace Subscription\Service; | |
use Zend\ServiceManager\ServiceLocatorAwareInterface; | |
use Zend\ServiceManager\ServiceLocatorAwareTrait; | |
class SubscriptionService implements SubscriptionInterface, ServiceLocatorAwareInterface | |
{ | |
use ServiceLocatorAwareInterface; |
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
<?php | |
namespace Subscription\Service; | |
use Zend\ServiceManager\ServiceLocatorAwareInterface; | |
use Zend\ServiceManager\ServiceLocatorAwareTrait; | |
class SubscriptionService implements SubscriptionInterface, ServiceLocatorAwareInterface | |
{ | |
use ServiceLocatorAwareInterface; |
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
<script type="text/javascript">var switchTo5x=true;</script> | |
<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>; | |
<script type="text/javascript" src="http://s.sharethis.com/loader.js"></script>; | |
<script type="text/javascript">stLight.options({publisher: "a3bbd2cb-00a8-4400-8bd6-18f000fd7ea5", doNotHash: false, doNotCopy: false, hashAddressBar: false});</script> | |
<script> | |
var options={ "publisher": "a3bbd2cb-00a8-4400-8bd6-18f000fd7ea5", "position": "left", "ad": { "visible": false, "openDelay": 5, "closeDelay": 0}, "chicklets": { "items": ["facebook", "twitter", "linkedin", "pinterest", "email", "sharethis"]}}; |
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
<?php | |
$form = new \Zend\Form\Form; | |
$form->setInputFilter($formFilter = new \Zend\InputFilter\InputFilter()); | |
$fieldSet = new \Zend\Form\FieldSet; | |
$fieldSet->setName('subforms'); | |
$subForm = new \Zend\Form\Form; |
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
# from terminal: | |
sudo openssl req -new -x509 -nodes -out /etc/nginx/server.crt -keyout /etc/nginx/server.key | |
chmod 600 /etc/nginx/server.key | |
# add these lines in virtual.conf under "server": | |
listen 443 ssl; | |
server_certificate /etc/nginx/server.crt; | |
server_certificate_key /etc/nginx/server.key; |