You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Thorsten D. <sc...@ma...> - 2011-06-10 15:11:48
|
Hello, i've the following method that belongs to my class Observer: public function setLogger( Study_Log_Interface $logger ) { $this->logger = $logger; } I use this phemto code: $injector = new phemto(); $injector->forType( 'Observer' )->call( 'setLogger' ); $injector->forVariable( 'logger' )->willUse( $myLogger ); $foo = $injector->create('Observer'); What happened is, that the method "setLogger" ist called, but a new instance of Logger will be created instead of using $myLogger, which i would like to use. If i remove the TypeHint like this: public function setLogger( $logger ) { $this->logger = $logger; } the give $myLogger is set via the setLogger method, and everything is fine. But i would like to hab |
From: Cory K. <co...@co...> - 2010-07-10 02:18:32
|
Hi, I am using Phemto to create a PDO instance. I would like to pass an array of PDO options (see $driver_options in the PDO docs<http://www.php.net/manual/en/pdo.construct.php>) but the only options I see are willUse($preference) and useString($string). It appeared that useString() could be passed an array and still function, but I got this error when doing so: Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to > allocate 71 bytes) in /home/cory/Workspace/cms/lib/phemto/phemto.php on > line 253 Maybe there could be another method on Variable called useValue() which can accept arrays or strings? Cory |
From: Noel D. <ma...@mc...> - 2009-04-27 23:35:13
|
On Sun, 26 Apr 2009 16:35:40 +0200 Darscan Tyrell <da...@gm...> wrote: > Are there any plans to develop it further? Yes definitely - time permitting. I'd very much like to help create a good dependency injection container for php. I think it's a very important technique. Lots of nice things seem to follow if you treat assembly as a separate, mini-layer of its own. > I prefer the Guice approach to Spring I'm thinking > Annotations (not officially supported by PHP, but can be done with > regex) I don't know java, or annotations apart from a quick google. First thoughts: (a) adds clutter as you read the code (b) creates an extra parsing burden for Phemto (c) introduces a new annotations language for users to learn (d) requires that code is adapted to work with Phemto not vice versa That may not be an adequate analysis of the possibilities though. Please do make suggestions and argue your case. So far, I think the philosophy is for a php API as simple and intuitive as it possibly can be. Definitely no novel-sized configs in XML :) Maybe annotations can be an injectable behaviour for Phemto... > possibly setter injection Yes. I tend to use constructor injection but if Foo needs a Bar and Bar needs a Foo one of them has to arrive via a setter. > Named injections. ? > I've just downloaded the code, and hope to try it out later today. At present I use revision 14 in my own projects (some temporary docs http://phemto.sourceforge.net/quick-start.php refer to this revision). HEAD has changed a bit since then and nothing should be considered stable at present. Noel |
From: Darscan T. <da...@gm...> - 2009-04-26 14:35:50
|
Hi! Having recently switched to using DI for my AS3 applications I've developed an itch for doing the same with my PHP apps. I prefer the Guice approach to Spring, so was pretty pleased to find this project! Are there any plans to develop it further? I'm thinking Annotations (not officially supported by PHP, but can be done with regex) and possibly setter injection and Named injections. I've just downloaded the code, and hope to try it out later today. Many thanks for Phemto! Cheers, |
From: Karanbir S. <mai...@ka...> - 2008-12-11 01:17:22
|
Karanbir Singh wrote: >> http://www.karan.org/mock/php-phemto/ Now updated for 0.1_alpha6 -- Karanbir Singh : http://www.karan.org/ GnuPG Public Key : http://www.karan.org/publickey.asc |
From: Karanbir S. <mai...@ka...> - 2008-12-10 16:52:54
|
Karanbir Singh wrote: > Hi, > > There are some rpms online at : > http://www.karan.org/mock/php-phemto/ now updated for phemto 0.1_alpha5 -- Karanbir Singh : http://www.karan.org/ GnuPG Public Key : http://www.karan.org/publickey.asc |
From: Karanbir S. <mai...@ka...> - 2008-12-09 14:08:58
|
Hi, There are some rpms online at : http://www.karan.org/mock/php-phemto/ I'll try and keep those updated as newer versions of phemto are released. -- Karanbir Singh : http://www.karan.org/ GnuPG Public Key : http://www.karan.org/publickey.asc |