Skip to content

Instantly share code, notes, and snippets.

@ahonymous
Last active October 27, 2015 09:46
Show Gist options
  • Select an option

  • Save ahonymous/03264d01bc694b4ed533 to your computer and use it in GitHub Desktop.

Select an option

Save ahonymous/03264d01bc694b4ed533 to your computer and use it in GitHub Desktop.
{
"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": "*"
}
}
{
"_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": []
}
<?php
namespace Entity;
trait EntityTrait
{
/**
* @var \DateTime
*/
private $createdAt;
/**
* @var \DateTime
*/
private $updatedAt;
/**
* @var \DateTime
*/
private $deletedAt;
}
<?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);
}
<?php
namespace Layer\Manager;
abstract class Manager implements ManagerInterface
{
}
<?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 = []);
}
<?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