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
server { | |
listen 80; | |
root /var/www/esolidar/public; | |
error_log /var/www/error.solidar.log; | |
index index.php index.html index.htm; | |
# Make site accessible from http://esolidar.com | |
server_name esolidar.com www.esolidar.com; | |
if ($http_x_forwarded_proto = http) { |
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
I'm using all this components: | |
"zendframework/zend-authentication": "^2.5.3", | |
"zendframework/zend-cache": "^2.7.1", | |
"zendframework/zend-console": "^2.6", | |
"zendframework/zend-db": "^2.8.1", | |
"zendframework/zend-debug": "^2.5.1", | |
"zendframework/zend-dom": "^2.6", | |
"zendframework/zend-eventmanager": "^3.0.1", | |
"zendframework/zend-feed": "^2.7", | |
"zendframework/zend-file": "^2.7", |
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 getServiceConfig() | |
{ | |
return [ | |
'factories' => [ | |
'Application\Model\UserTable' => function ($sm) { | |
$dbAdapter = $sm->get('Zend\Db\Adapter\Adapter'); | |
if (getenv('APPLICATION_ENV') === 'production') { | |
$cacheAdapter = null; | |
} else { | |
$cacheAdapter = null; // $sm->get('memcached'); |
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 | |
/* | |
* To change this template, choose Tools | Templates and open the template in the editor. | |
*/ | |
namespace Application\Model; | |
use Zend\Cache\Storage\Adapter\AbstractAdapter; | |
use Zend\Db\Adapter\Adapter; | |
use Zend\Db\Sql\Select; |
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 Application\Service\Factory; | |
use Aws\Sdk as AwsSdk; | |
use Interop\Container\ContainerInterface; | |
use Zend\ServiceManager\AbstractPluginManager; | |
/** | |
* Class AwsFactory |
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 __construct(Adapter $adapter, AbstractAdapter $cacheAdapter = null) | |
{ | |
$this->table = 'categories'; | |
$this->adapter = $adapter; | |
$this->cacheAdapter = $cacheAdapter; | |
$this->featureSet = new Feature\FeatureSet(); | |
$this->initialize(); | |
} | |
public function addCat($data) |
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
<pre class='xdebug-var-dump' dir='ltr'> | |
<b>object</b>(<i>Zend\Db\ResultSet\ResultSet</i>)[<i>1150</i>] | |
<i>protected</i> 'allowedReturnTypes' <font color='#888a85'>=></font> | |
<b>array</b> <i>(size=2)</i> | |
0 <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'arrayobject'</font> <i>(length=11)</i> | |
1 <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'array'</font> <i>(length=5)</i> | |
<i>protected</i> 'arrayObjectPrototype' <font color='#888a85'>=></font> | |
<b>object</b>(<i>ArrayObject</i>)[<i>1153</i>] | |
<i>private</i> 'storage' <font color='#888a85'>=></font> | |
<b>array</b> <i>(size=0)</i> |
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
<select name="cause" class="causes"> | |
<option value=""><?= $this->translate('Selecione um item'); ?></option> | |
<?php foreach ($this->npoCategories as $key => $category) : ?> | |
<option | |
value="<?= $category->id; ?>"><?= (isset($this->Lang()->key) && ($this->Lang()->key == 'pt' || $this->Lang()->key == 'br')) ? $category->name : $category->name_en; ?></option> | |
<?php endforeach; ?> | |
</select> |
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 Application\Controller; | |
use Zend\Mvc\Controller\AbstractActionController; | |
use Zend\Session\Container as SessionManager; | |
use Zend\Mvc\I18n\Translator as TranslatorService; | |
use Zend\View\Model\ViewModel; | |
// Models | |
use Application\Model\UsersTable; | |
use Application\Model\AuctionsTable; |
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 | |
/** | |
* Created by PhpStorm. | |
* User: apoca | |
* Date: 29/04/16 | |
* Time: 17:38 | |
*/ | |
namespace Application\Controller\Factory; |