View gist:f58c972c5678ec7469d5387ca6c84503
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 Injectable | |
{ | |
public function tomalaToda($argument) | |
{ | |
return "Comete ". $argument; | |
} | |
} | |
class Golosa |
View snake.html
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
<!documentTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Play Snake Game</title> | |
<style type="text/css"> | |
body {text-align:center;} | |
canvas { border:5px dotted #ccc; } | |
h1 { font-size:50px; text-align: center; margin: 0; padding-bottom: 25px;} | |
</style> |
View gist:8455010
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 User { | |
private $_db = null; | |
private $_log = null; | |
private $_params = array(); | |
public function __construct(array $params) { | |
$this->setParams($params); | |
} |
View gist:8454758
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 User { | |
private $_db = null; | |
public function setDB(DBClass $db) { | |
return $this->_db = $db; | |
} | |
public function getDB() { | |
if(null == $this->_db) { |
View gist:2646543
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
;(function( $, window, document, undefined) { | |
var pluginName = 'ejemplo', | |
defaults = { | |
autoExec : true, | |
autoExecMethod : 'auto', | |
default : 'values', | |
} | |
// Código de inicialización acá | |
methods = { |
View Builder.php
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 Builder | |
{ | |
public $objects = []; | |
public $factory = []; | |
public function factory($name, $callable) | |
{ | |
$this->factory[$name] = $callable->bindTo($this); | |
} |