🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.php
Article #232137

Re: Dependecy injection - jak to działa?

#232137
From: Wojciech Bancer
Date: Sat, 15 Dec 2018 00:06
21 lines
1614 bytes
On 2018-12-14, Marek S <precz@spamowi.com> wrote:

[...]

> Czyli chciałbym wykonać coś takiego (opisowo):
>
> if (parametrFukcjiJestTypuNiespodzianka) p1=new niespodzianka();
> if (parametr2FukcjiJestTypuNiespodzianka2) p2=new niespodzianka2();
>
> x(p1,p2);

http://php.net/manual/en/reflectionparameter.gettype.php
http://php.net/manual/pl/reflectionclass.newinstance.php
http://php.net/manual/pl/reflectionclass.newinstanceargs.php

i ogólnie:
http://php.net/manual/en/reflectionparameter.gettype.php

-- 
Wojciech Bańcer
wojciech.bancer@gmail.com
Technical Details
Message-ID: <slrnq18hch.a42.wojciech.bancer@pl-test.org>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!news.nask.pl!news.nask.org.pl!news.unit0.net!newsreader4.netcologne.de!news.netcologne.de!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer04.fr7!futter-mich.highwinds-media.com!news.highwinds-media.com!newsfeed.neostrada.pl!unt-exc-01.news.neostrada.pl!unt-spo-b-01.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mail
References: <pv1eid$s19$1@node2.news.atman.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!news.nask.pl!news.nask.org.pl!news.unit0.net!newsreader4.netcologne.de!news.netcologne.de!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer04.fr7!futter-mich.highwinds-media.com!news.highwinds-media.com!newsfeed.neostrada.pl!unt-exc-01.news.neostrada.pl!unt-spo-b-01.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mail
Newsgroups: pl.comp.lang.php
From: Wojciech Bancer <wojciech.bancer@gmail.com>
Subject: Re: Dependecy injection - jak to działa?
References: <pv1eid$s19$1@node2.news.atman.pl>
Organization: None
Date: Sat, 15 Dec 2018 01:06:41 +0100
User-Agent: slrn/1.0.3 (Darwin)
Mime-Version: 1.0
Message-ID: <slrnq18hch.a42.wojciech.bancer@pl-test.org>
Lines: 21
NNTP-Posting-Host: 46.227.242.29
X-Trace: 1544832401 unt-rea-a-02.news.neostrada.pl 490 46.227.242.29:45989
X-Complaints-To: abuse@news.neostrada.pl
X-Received-Bytes: 1315
X-Received-Body-CRC: 1676339276
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit