Skip to content

Instantly share code, notes, and snippets.

@taiebb
Last active May 17, 2016 09:32
Show Gist options
  • Save taiebb/4d5358e6aa8b524e74661816b8c178ef to your computer and use it in GitHub Desktop.
Save taiebb/4d5358e6aa8b524e74661816b8c178ef to your computer and use it in GitHub Desktop.
services:
ssi_api_manager:
class: AppBundle\Services\SiiApiManager
arguments: [@component]
<?php
namespace AppBundle\Services;
use AppBundle\Entity\Taieb;
use AppBundle\Entity\Component;
class SiiApiManager {
private $component;
public function __construct(Component $component) {
$this->component = $component;
}
public function develop() {
$developer = new Taieb();
return $developer->develop($this->component);
}
}
<?php
class SSII
{
public function doDevelopment()
{
$apiManager = $this->get('ssi_api_manager');
return $apiManager->develop();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment