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 | |
/** | |
* Image | |
* | |
* @author Rafael Armenio - <[email protected]> | |
* @author Elton Minetto - <[email protected]> | |
* @author Andre Espeiorin - <[email protected]> | |
* Based in http://www.codesphp.com/php-category/gd-graphiques/php-function-proportional-image-resizing.html | |
*/ | |
namespace Coderockr; |
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
delimiter $$ | |
drop procedure if exists make_dates $$ | |
CREATE PROCEDURE make_dates( max_recs int) | |
begin | |
declare start_dt datetime; | |
declare numrecs int default 1; | |
set start_dt = date_format( now() - interval max_recs minute, '%Y-%m-%d %H:%i:00'); | |
insert into Couvert (user_id, date, value, created) values (1, start_dt, 3.9, now() ); |
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
public function testUpdate() | |
{ | |
$tableGateway = $this->getTable('Skel\Model\Post'); | |
$post = $this->addPost(); | |
$saved = $tableGateway->save($post); | |
$id = $saved->id; | |
$this->assertEquals(1, $id); |
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
sudo cp /private/etc/php.ini.default /private/etc/php.ini | |
sudo php /usr/lib/php/install-pear-nozlib.phar | |
pear config-set php_ini /private/etc/php.ini | |
pecl config-set php_ini /private/etc/php.ini | |
sudo pear upgrade-all |
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 Admin\Model; | |
use Zend\InputFilter\Factory as InputFactory; | |
use Zend\InputFilter\InputFilter; | |
use Zend\InputFilter\InputFilterAwareInterface; | |
use Zend\InputFilter\InputFilterInterface; | |
use Core\Model\Entity; | |
/** |
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 | |
return array( | |
'di' => array(), | |
'view_helpers' => array( | |
'invokables'=> array( | |
'session' => 'Core\View\Helper\Session' | |
) | |
), | |
); |
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
<ul class="nav"> | |
<li class="active"><a href="/"><?php echo $this->translate('Home') ?></a></li> | |
<li> | |
<?php $user = $this->session()->offsetGet('user'); ?> | |
<?php if ($user): ?> | |
<a href="/admin/auth/logout"><?php echo $this->translate('Sair') ?></a> | |
<?php else: ?> | |
<a href="/admin/auth/index"><?php echo $this->translate('Entrar') ?></a> | |
<?php endif;?> |
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
<VirtualHost *:80> | |
ServerName zf2napratica.dev | |
DocumentRoot /Users/eminetto/Documents/Projects/zf2napratica/public | |
SetEnv APPLICATION_ENV "development" | |
SetEnv PROJECT_ROOT "/Users/eminetto/Documents/Projects/zf2napratica" | |
<Directory /Users/eminetto/Documents/Projects/zf2napratica/public> | |
DirectoryIndex index.php | |
AllowOverride All | |
Order allow,deny | |
Allow from all |
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 if ($this->pageCount > 1): ?> | |
<div class="navigation clearfix"> | |
<?php if($this->current != 1): ?> | |
<a href="<?= $this->url(null, array('page' => 1), true) ?>">«</a> | |
<?php else: ?> | |
<a href="<?= $this->url(null, array('page' => 1), true) ?>" class="disabled">«</a> | |
<?php endif;?> | |
<!-- Previous page link --> | |
<?php if (isset($this->previous)): ?> |
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
create database zf2napratica; | |
create database zf2napratica_test; | |
GRANT ALL privileges ON zf2napratica.* TO zend@localhost IDENTIFIED BY 'zend'; | |
GRANT ALL privileges ON zf2napratica_test.* TO zend@localhost IDENTIFIED BY 'zend'; | |
use zf2napratica; | |
CREATE TABLE IF NOT EXISTS `users` ( | |
`id` INT NOT NULL AUTO_INCREMENT , |