Skip to content

Instantly share code, notes, and snippets.

@kojiromike
Created October 13, 2014 20:23
Show Gist options
  • Save kojiromike/a21bf4518d0ff3805d84 to your computer and use it in GitHub Desktop.
Save kojiromike/a21bf4518d0ff3805d84 to your computer and use it in GitHub Desktop.
<?php
/**
* Marker interface
*/
interface IConfig {}
/**
* An api sdk tool
*/
interface IApi
{
public __construct(IConfig $cfg);
}
/**
* Api configuration specific to http
*/
interface IHttpConfig extends IConfig
{
public getSomeNiceHttpSpecificFeature();
}
/**
* Illegal, but would be really nice to have. Is there a good reason this is not allowed?
*/
interface IHttpApi extends IApi
{
public __construct(IHttpConfig $cfg);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment