Skip to content

Instantly share code, notes, and snippets.

@matej21
Last active August 29, 2015 14:09
Show Gist options
  • Save matej21/e01a002e8269dbd840df to your computer and use it in GitHub Desktop.
Save matej21/e01a002e8269dbd840df to your computer and use it in GitHub Desktop.
services:
# takhle to bylo pred tim
# - FooFactory
#a takhle nyni
-
implement: FooFactory
parameters: [id]
arguments: [%id%]
<?php
class Foo
{
public function __construct($id, FooModel $fooModel)
{
...
}
}
<?php
interface FooFactory
{
/**
* @return Foo
*/
public function create($id);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment