Skip to content

Instantly share code, notes, and snippets.

View nahidulhasan's full-sized avatar

Nahidul Hasan nahidulhasan

  • Brain Station 23 Ltd.
  • Dhaka,Bangladesh
View GitHub Profile
<?php
namespace App\Services;
use Collective\Html\FormBuilder;
class Macros extends FormBuilder
{
/**
* Generate Bank drop down list
*
@nahidulhasan
nahidulhasan / MacrosServiceProvider.php
Last active October 12, 2018 04:16
MacrosServiceProvider
<?php
namespace App\Providers;
use App\Services\Macros;
use Collective\Html\HtmlServiceProvider;
/**
* Class MacroServiceProvider
* @package App\Providers
<?php
interface ConnectionInterface
{
public function connect();
}
class DbConnection implements ConnectionInterface
{
/**
<?php
class MySQLConnection
{
/**
* db connection
*/
public function connect()
{
var_dump('MYSQL Connection');
}
<?php
interface WorkAbleInterface
{
public function work();
}
interface SleepAbleInterface
{
public function sleep();
}
<?php
interface workerInterface
{
public function work();
public function sleep();
}
class HumanWorker implements workerInterface
{
public function work()
<?php
interface LessonRepositoryInterface
{
/**
* Fetch all records.
*
* @return array
*/
public function getAll();
}
<?php
interface AreaInterface
{
public function calculateArea();
}
class Rectangle implements AreaInterface
{
public $width;
public $height;
<?php
class Rectangle
{
public $width;
public $height;
public function __construct($width, $height)
{
$this->width = $width;
$this->height = $height;
}
<?php
namespace Report;
use Report\Repositories\OrdersRepository;
class OrdersReport
{
protected $repo;
protected $formatter;
public function __construct(OrdersRepository $repo, OrdersOutPutInterface $formatter)