mercredi 1 juin 2016

PHP __construct with unnamed function below

I encountered this code in a larevel.

public function __construct(
    Request $request,
    UserRepository $userRepository,
    ProfileRepository $profileRepository
)

{
    parent::__construct();

    $this->request = $request;
    $this->profile_repository = $profileRepository;
    $this->model = $this->model_repository->getModel();
    $this->entity_name_plural = str_plural($this->entity_name);

}

What is the use of the unnamed function below the constructor? This is the first time I encountered this so I am not sure how it really works. Thanks for your response.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/22xd2nz
via IFTTT

Aucun commentaire:

Enregistrer un commentaire