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 | |
$album = new Album; | |
$photo = new Photo; | |
if(isset($_POST['id'])) | |
$album = $this->getEntityManager()->getRepository('Admin\Entity\Album')->find($this -> params() -> fromPost('id')); | |
$photo -> setDate(date_create($_POST['date_photo'])); | |
$photo -> setDescription($_POST['description_photo']); | |
$photo -> setMainPhoto($novo_nome); |
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\Entity; | |
use Doctrine\ORM\Mapping as ORM, | |
Doctrine\Common\Collections\ArrayCollection; | |
use Zend\InputFilter\Factory as InputFactory; | |
use Zend\InputFilter\InputFilter; | |
use Zend\InputFilter\InputFilterAwareInterface; |
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\Entity; | |
use Doctrine\ORM\Mapping as ORM, | |
Doctrine\Common\Collections\ArrayCollection; | |
use Zend\InputFilter\Factory as InputFactory; | |
use Zend\InputFilter\InputFilter; | |
use Zend\InputFilter\InputFilterAwareInterface; |
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\Entity; | |
use Doctrine\ORM\Mapping as ORM, | |
Doctrine\Common\Collections\ArrayCollection; | |
/** | |
* @ORM\Entity | |
* @ORM\Table(name="funcionario") | |
*/ |
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 Application\Controller; | |
use Zend\View\Model\ViewModel; | |
use Zend\Mvc\Controller\AbstractActionController; | |
class ClienteServiceController extends AbstractActionController | |
{ | |
// Armazena na variável o endereço do webserver no servidor |
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 ApplicationTest\Controller; | |
use Zend\Test\PHPUnit\Controller\AbstractHttpControllerTestCase; | |
class LoginControllerTeste extends AbstractHttpControllerTestCase | |
{ | |
public function setUp() | |
{ |
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 | |
use Zend\Test\PHPUnit\Controller\AbstractHttpControllerTestCase; | |
use \CodeGuy; | |
class UC001LoginTest extends AbstractHttpControllerTestCase | |
{ | |
protected function setUp() | |
{ | |
$this->setApplicationConfig( |
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 Application\Form; | |
use Zend\Form\Form; | |
class LoginForm extends Form | |
{ | |
public function __construct($name = null) | |
{ | |
parent::__construct('login-form'); |
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 Application\Controller; | |
use Zend\Mvc\Controller\AbstractActionController; | |
class AcessarEntidadeController extends AbstractActionController | |
{ | |
/** | |
* @var EntityManager |
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 | |
$inputFilter->add($factory->createInput(array( | |
'name' => 'id', | |
'required' => false, | |
'filters' => array( | |
array('name' => 'Int'), | |
), | |
))); |