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
/** | |
* Inicializa o translate | |
* | |
* @return void | |
* @author Elton Minetto | |
*/ | |
public function _initTranslate() | |
{ | |
$config = Zend_Registry::get('config'); | |
$translate = $config->resources->translate; |
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 (count($this->data) > 0): ?> | |
<?php foreach($this->data as $d):?> | |
<h3><?php echo $d['title'];?></h3> | |
<p><?php echo $d['description'];?></p> | |
<a href="/post/update/id/<?php echo $d['id'];?>">Atualizar</a><br> | |
<a href="/post/delete/id/<?php echo $d['id'];?>">Excluir</a><br> | |
<?php endforeach;?> | |
<?php echo $this->data;?> | |
<?php endif;?> | |
<a href="/post/create">Criar novo post</a> |
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
/** | |
* Inicializa as rotas | |
* | |
* @return void | |
* @author Elton Minetto | |
*/ | |
public function _initRoutes() | |
{ | |
$updateRoute = new Zend_Controller_Router_Route( | |
'atualizar/: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
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" /> | |
<title>Blog</title> | |
</head> | |
<body> | |
<?php | |
//mensagens de erro | |
$session = Zend_Registry::get('session'); | |
if(isset($session->erro)) { |
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 | |
//include do zend | |
$includePath = get_include_path(); | |
$includePath .= ':/Users/eminetto/Documents/Projects/library.git/'; | |
set_include_path($includePath); | |
require_once 'Zend/Loader/Autoloader.php'; | |
$autoloader = Zend_Loader_Autoloader::getInstance(); | |
$autoloader->setFallbackAutoloader(true); |
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
<snippet> | |
<content><![CDATA[public function get${1/(.*)/\u$1/}() | |
{ | |
return \$this->${1:$SELECTION}; | |
} | |
public function set${1/(.*)/\u$1/}(\$$1) | |
{ | |
return \$this->$1 = \$$1; | |
} |
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
class base { | |
group { "puppet": | |
ensure => "present", | |
} | |
exec { "apt_update": | |
command => "apt-get update", | |
path => "/usr/bin" | |
} |
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 | |
class Application_Form_Login extends Zend_Dojo_Form | |
{ | |
public function init() | |
{ | |
$this->setName('Login'); | |
//elementos do Dojo |
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 | |
class Application_Form_Post extends Zend_Dojo_Form | |
{ | |
public function init() | |
{ | |
$this->setName('Post'); | |
$this->setAttrib('id', 'FormTeste'); |
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
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
</head> | |
<?php | |
Zend_Dojo::enableView($this); | |
if ($this->dojo()->isEnabled()): | |
echo $this->dojo(); | |
echo $this->dojo()->addStylesheetModule('dijit.themes.tundra'); | |
endif; |