Skip to content

Instantly share code, notes, and snippets.

@teddy-hoo
Last active May 10, 2017 15:02
Show Gist options
  • Select an option

  • Save teddy-hoo/322a6854bffd2ea278dfe9320806ff49 to your computer and use it in GitHub Desktop.

Select an option

Save teddy-hoo/322a6854bffd2ea278dfe9320806ff49 to your computer and use it in GitHub Desktop.
functional programming in php
<?php
interface Model {
public function getConnection();
public function getDb();
public function getTableName();
public function getData();
public function getFileds();
}
class Order implements Model {
public function getConnection () {
return 'connection';
}
}
function createRow (Model $model) {
}
function createOrder (Model $order, Callable $createRow) {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment