Skip to content

Instantly share code, notes, and snippets.

View eminetto's full-sized avatar
:octocat:
always learning

Elton Minetto eminetto

:octocat:
always learning
View GitHub Profile
<?php
namespace Api\PostProcessor;
use JMS\Serializer\SerializerBuilder;
use JMS\Serializer\SerializationContext;
/**
* Classe concreta que retorna JSON
*
<?php
namespace Api\PostProcessor;
use JMS\Serializer\SerializerBuilder;
use JMS\Serializer\SerializationContext;
/**
* Classe concreta que retorna JSON
*
#include<stdio.h>
#include<conio.h>
main() {
int pP;
printf("Digite o peso dos peixes\n");
scanf("%d",&pP);
if(pP > 50){
clrscr();
int E;
@eminetto
eminetto / gist:5864071
Created June 26, 2013 01:37
Exemplo de ViewHelper
<?php
namespace Application\View\Helper;
use Zend\View\Helper\AbstractHelper;
use Zend\ServiceManager\ServiceLocatorAwareInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
/**
* Retorna o recurso sendo acessado
<?php
return array(
'controllers' => array(
'invokables' => array(
'Aluno\Controller\Aluno' => 'Aluno\Controller\AlunoController',
),
),
'router' => array(
'routes' => array(
@eminetto
eminetto / Aluno.php
Last active December 20, 2015 14:29
<?php
namespace Aluno\Model;
use Zend\InputFilter\Factory as InputFactory;
use Zend\InputFilter\InputFilter;
use Zend\InputFilter\InputFilterAwareInterface;
use Zend\InputFilter\InputFilterInterface;
class Aluno
{
<?php
namespace Aluno\Model;
use Zend\Db\TableGateway\TableGateway;
use Zend\Db\Adapter\Adapter;
use Zend\Db\ResultSet\ResultSet;
class AlunoTable
{
protected $tableGateway;
<?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
namespace Aluno;
<?php
$title = 'Alunos';
$this->headTitle($title);
?>
<h1><?=$this->escapeHtml($title)?></h1>
<p>
<a href="<?=$this->url('aluno', array('action'=>'add'))?>">Novo aluno</a>
</p>
<table class="table">
<?php
namespace Aluno\Form;
use Zend\Form\Form;
class AlunoForm extends Form
{
public function __construct($name = null)
{
parent::__construct('aluno');