Skip to content

Instantly share code, notes, and snippets.

@etki
Created June 4, 2015 09:27
Show Gist options
  • Save etki/04903718b1095ebdd7b0 to your computer and use it in GitHub Desktop.
Save etki/04903718b1095ebdd7b0 to your computer and use it in GitHub Desktop.
<?php
namespace AcmeBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Site\RsrSecurityBundle\Service\RsrNwlSystem;
class ServiceController extends Controller
{
public function serviceRelatedAction()
{
/** @type RsrNwlSystem $service */
// $service - инстанс заданного в services.yml класса
$service = $this->get('rsr.sendurl');
$response = $service->sendRequest();
// ...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment