Skip to content

Instantly share code, notes, and snippets.

@samsch
Last active January 5, 2016 20:37
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 samsch/0aa23f75e58ae3c48e89 to your computer and use it in GitHub Desktop.
Save samsch/0aa23f75e58ae3c48e89 to your computer and use it in GitHub Desktop.
<?php
namespace AppBundle\Services;
use AppBundle\Entity\AnEntityRepo;
use AppBundle\Services\OtherService;
use AppBundle\Services\ThirdService;
class Features
{
protected $entityRepo : AnEntityRepo;
protected $otherService : OtherService;
protected $thirdService : ThirdService;
//...
}
<?php
namespace AppBundle\Services;
use AppBundle\Entity\AnEntityRepo;
use AppBundle\Services\OtherService;
use AppBundle\Services\ThirdService;
class Features
{
protected $entityRepo;
protected $otherService;
protected $thirdService;
public function __construct(
AnEntityRepo $entityRepo,
OtherService $otherService,
ThirdService $thirdService
) {
$this->entityRepo = $entityRepo;
$this->otherService = $otherService;
$this->thirdService = $thirdService;
}
//...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment