Last active
October 27, 2015 09:46
-
-
Save ahonymous/03264d01bc694b4ed533 to your computer and use it in GitHub Desktop.
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
| { | |
| "name": "ahonymous/hw4", | |
| "description": "Geekhub AdvancedPHP 2015 HW#4", | |
| "license": "MIT", | |
| "authors": [ | |
| { | |
| "name": "Alex Moshta", | |
| "email": "ahonymous@gmail.com" | |
| } | |
| ], | |
| "autoload": { | |
| "psr-4": { | |
| "Layer\\": "src/Layer/" | |
| } | |
| }, | |
| "minimum-stability": "stable", | |
| "require": { | |
| "php": ">=5.5.0", | |
| "ext-mysqlnd": "*" | |
| } | |
| } |
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
| { | |
| "_readme": [ | |
| "This file locks the dependencies of your project to a known state", | |
| "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", | |
| "This file is @generated automatically" | |
| ], | |
| "hash": "bc03f4f2b191acd26409a2d26788fc77", | |
| "content-hash": "2de558137f6716713ab19599d2619a5c", | |
| "packages": [], | |
| "packages-dev": [], | |
| "aliases": [], | |
| "minimum-stability": "stable", | |
| "stability-flags": [], | |
| "prefer-stable": false, | |
| "prefer-lowest": false, | |
| "platform": { | |
| "php": ">=5.5.0", | |
| "ext-mysqlnd": "*" | |
| }, | |
| "platform-dev": [] | |
| } |
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 Entity; | |
| trait EntityTrait | |
| { | |
| /** | |
| * @var \DateTime | |
| */ | |
| private $createdAt; | |
| /** | |
| * @var \DateTime | |
| */ | |
| private $updatedAt; | |
| /** | |
| * @var \DateTime | |
| */ | |
| private $deletedAt; | |
| } |
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 Layer\Connector; | |
| interface ConnectorInterface | |
| { | |
| /** | |
| * @param $host | |
| * @param $user | |
| * @param $password | |
| * @return mixed | |
| */ | |
| public function connect($host, $user, $password); | |
| /** | |
| * @param $db | |
| * @return mixed | |
| */ | |
| public function connectClose($db); | |
| } |
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 Layer\Manager; | |
| abstract class Manager implements ManagerInterface | |
| { | |
| } |
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 Layer\Manager; | |
| interface ManagerInterface | |
| { | |
| /** | |
| * @param $entity | |
| * @return mixed | |
| */ | |
| public function insert($entity); | |
| /** | |
| * @param $entity | |
| * @return mixed | |
| */ | |
| public function update($entity); | |
| /** | |
| * @param $entity | |
| * @return mixed | |
| */ | |
| public function remove($entity); | |
| /** | |
| * @return mixed | |
| */ | |
| public function clear(); | |
| /** | |
| * @param $entityName | |
| * @param $id | |
| * @return mixed | |
| */ | |
| public function find($entityName, $id); | |
| /** | |
| * @param $entityName | |
| * @return mixed | |
| */ | |
| public function findAll($entityName); | |
| /** | |
| * @param $entityName | |
| * @param array $criteria | |
| * @return mixed | |
| */ | |
| public function findBy($entityName, $criteria = []); | |
| } |
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 | |
| require __DIR__ . '/../vendor/autoload.php'; | |
| echo "Hi ALL!"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment