Skip to content

Instantly share code, notes, and snippets.

@naholyr
Created March 17, 2011 21:28
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 naholyr/875167 to your computer and use it in GitHub Desktop.
Save naholyr/875167 to your computer and use it in GitHub Desktop.
services:
dumb:
class: Acme\DumbService
arguments:
- "name"
- "hello": { "world": { "foo": %mailer_host% } }
<?php
...
$dumb_service = $this->container->get('dumb');
$dumb_service->dump();
...
<?php
namespace Acme;
class DumbService
{
public function __construct($name, $options)
{
$this->name = $name;
$this->options = $options;
}
public function dump()
{
var_dump($this->name, $this->options);
}
}
string 'name' (length=4)
array
'hello' =>
array
'world' =>
array
'foo' => string 'localhost' (length=9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment