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": "my-project", | |
"version": "1.0.0", | |
"main": "path/to/main.css", | |
"ignore": [ | |
".jshintrc", | |
"**/*.txt" | |
], | |
"dependencies": { | |
"<name>": "<version>", |
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
{ | |
"directory": "web/vendor", | |
"json": "bower.json" | |
} |
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": "App-Example", | |
"version": "1.0.0", | |
"dependencies": { | |
"bootstrap": "*", | |
"jquery": "~2.0.1", | |
"modernizr": "*" | |
} | |
} |
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
interface WelcomeInterface | |
{ | |
public function getWelcome(); | |
} | |
class SpanishWellcome implements WelcomeInterface | |
{ | |
public function getWelcome() | |
{ | |
return "Bienvenid@"; |
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
class Application | |
{ | |
protected $name; | |
public function __construct($name) | |
{ | |
$this->name = $name; | |
} | |
public function welcome(WelcomeInterface $wellcome) | |
{ |
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
$welcomeUser = new Application("Juan Luis"); | |
//Bienvenid@ Juan Luis | |
echo $welcomeUser->getWelcome(new SpanishHello()); | |
//Wellcome Juan Luis | |
echo $welcomeUser->getWelcome(new EnglishHello()); |
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
interfaz RepositoryInterface | |
{ | |
public function insert($data); | |
public function update($data); | |
public function delete($data); | |
public function findAll($data); | |
public function findById($data); | |
} |
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
class ArticleRepository implements RepositoryInterface | |
{ | |
public function insert($data) | |
{ | |
//acción insert en BD | |
} | |
public function update($data) | |
{ | |
//acción update en BD | |
} |
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
class UserRepository implements RepositoryInterface | |
{ | |
public function insert($data) | |
{ | |
//acción insert en BD | |
} | |
public function update($data) | |
{ | |
//acción update en BD | |
} |
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
interfaz CRUInterface | |
{ | |
public function insert($data); | |
public function update($data); | |
public function findAll($data); | |
public function findById($data); | |
} |