[TYPO3-mvc] [Extbase] override type definition

Claus Fassing claus at fassing.eu
Mon Sep 6 12:46:44 CEST 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello Sebastian,

thank you for the answer.

Am 06.09.2010 08:42, schrieb Sebastian Kurfürst:
> Hi Claus,
> 
> unfortunately, this is right now not possible, as Extbase needs this
> Type information from the annotation to build the correct class.

I read the Extbase/Fluid book of you and Jochen and it reminds me on
some place to Java, so I thought I could use something like Object<?> :)

But what about interfaces ? The implementation class is also type of the
interface class (or only in Java,not in PHP?).

I use the interface as type definition in annotation.
/**
 * offerType
 * @var Tx_Mioffers_Domain_Model_OfferTypeInterface
 */
protected $offerType;

I use in the constructor
$this->offerType = new Tx_Mioffers_Domain_Model_SuccessorOffer();

And try to write the implementation class in setter
/**
 * Setter for offerType
 *
 * @param Tx_Mioffers_Domain_Model_OfferTypeInterface $offerType offerType
 * @return void
 */
public function setOfferType(Tx_Mioffers_Domain_Model_OfferTypeInterface
$offerType) {
	$this->offerType = $offerType;
}

Tx_Mioffers_Domain_Model_SuccessorOffer implements the interface
Tx_Mioffers_Domain_Model_OfferTypeInterface

The interface body is empty.

All name conventions are correct.
But this will not work at all.


> 
> However, it would be a really nice feature :-) Could you open up a
> feature request?

Yes, I will try it, I'm not sure if I'm able to express this
understandably :)
> 
> Greets,
> Sebastian

Regards Claus

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJMhMaUAAoJELsIv+audObfYP8H/3klalFXZLlnrh9MtNY3sgJI
/QWeTLr3HqqpHBW7Xn89khdpmRX2u5cDwO/2DElF8PBCt14Kh7sSqfG75FYl384J
fWV0fryxGqzhG5je7haAYML5eypD94JM6CQmFwoXgDCQRcdsk+pmusze6Dm2SFTQ
/Y+P2SxtnUIyA/8IWyDo1CcnxYBaGzhzhp0MriBthUNygSoYSn7aAePu1EaHgJSZ
oKjJrA4TqWDVrl42hvr0UURYPxFM1ciiWgEkZqpUV2RABMv94HLWup5U4s2cP5v/
IfGIuVnb9QwrqYvaZkR4wUEdgHiow8iUH3CoskWEb5vN1ppT47fX0j+XN5c73Eo=
=2MkE
-----END PGP SIGNATURE-----


More information about the TYPO3-project-typo3v4mvc mailing list