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
config.vm.define 'nome_do_host' do |node| | |
node.vm.hostname = "nome_do_host" | |
## USE A LINHA A SEGUIR SE QUISER | |
## USAR O IP DE UMA REDE PRIVADA | |
node.vm.network :private_network, ip: "192.168.56.1" | |
## OU USE A LINHA A SEGUIR SE QUISER | |
## USAR A MÁQUINA NA MESMA REDE | |
## EM MODO BRIDGE |
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
config.proxy.http = "http://nome_do_usuario:sua_senha@ip_ou_nome_do_proxy:numero_da_porta_do_proxy" | |
config.proxy.https = "http://nome_do_usuario:sua_senha@ip_ou_nome_do_proxy:numero_da_porta_do_proxy" | |
config.proxy.ftp = "http://nome_do_usuario:sua_senha@ip_ou_nome_do_proxy:numero_da_porta_do_proxy" |
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 | |
class DomainCheck { | |
private $email; | |
function __construct($email_a_verificar) { | |
$this->email = $email_a_verificar; | |
} | |
private function getDominio($email) { | |
$email = explode('@',$email); |
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
drop table IF EXISTS obra; | |
drop table IF EXISTS personagem; | |
CREATE TABLE IF NOT EXISTS personagem ( | |
id INT NOT NULL AUTO_INCREMENT , | |
nome VARCHAR(200) NOT NULL , | |
PRIMARY KEY (id) | |
) | |
ENGINE = InnoDB; | |
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
{ | |
"name": "evaldobarbosa/charondocs", | |
"description": "Aplicação exemplo com uso do charon", | |
"license": "MIT", | |
"keywords": [ | |
"ORM", | |
"charon" | |
], | |
"homepage": "http://www.gitgub.com/evaldobarbosa/charon", | |
"require": { |
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 | |
/** | |
* Essa é a class de Personagem. Nela aplicaremos o conceito de chave reversa (rk) no mapeamento | |
*/ | |
// Esse é o namespace da classe. Ele deverá ficar na pasta src/Application/Model | |
namespace Application\Model; | |
//A classe Personagem herdará da classe Entity | |
use \Charon\Entity; |
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 | |
//O namespace dos models | |
namespace Application\Model; | |
use \Charon\Entity; | |
/** | |
* A classe que representa a obra em que o personagem apareceu. | |
* Derivando, como a classe Personagem, de Entity do pacote Charon | |
* Veja outros comentários na classe Personagem |
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 | |
require "../vendor/autoload.php"; | |
define('DSN','mysql://usuario:senha@localhost:3306/charondocs'); | |
use \Respect\Rest\Router; | |
use \Charon\Connection as conn; | |
$r3 = new Router; |
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
<h1>Personagens</h1> | |
<ul> | |
<?php | |
foreach( $p as $personagem ) { | |
echo sprintf( | |
'<li><a href="/application/index/detail/%d">%s</a></li>', | |
$personagem->id, | |
$personagem->nome | |
); | |
} |
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
<h1><?php echo $p->nome; ?></h1> | |
<?php | |
foreach( $p->obra as $obra ) { | |
echo sprintf( | |
'<p">%s</p>', | |
$obra->nome | |
); | |
} | |
?> |
OlderNewer