Skip to content

Instantly share code, notes, and snippets.

@MetaDone
Created June 28, 2016 06:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MetaDone/4ad23763b3027e1160a035ddeb6a29a5 to your computer and use it in GitHub Desktop.
Save MetaDone/4ad23763b3027e1160a035ddeb6a29a5 to your computer and use it in GitHub Desktop.
namespace Example\Module;
use Example\Contract\ExampleModel //типа интерфейс
class ModuleExample
{
private $model;
public function __construct(ExampleModel $model)
{
$this->model = $model;
}
public function anyAction($anyParam)
{
$this->model->anyMethod($anyParam);
...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment