[Flow] How to retrieve settings?

Andreas Wolf aw at foundata.net
Sat Jan 4 15:59:29 CET 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi,

Am 04.01.2014 15:43, schrieb Andreas Wolf:
> The original class structure is this:
> 
> + MyClass \- MyDerivedClass
> 
> After class generation, the structure looks like this:
> 
> + MyClass_Original +-- MyClass \+- MyDerivedClass_Original \--
> MyDerivedClass

gnah, that's bullshit... sorry for that.

This structure is correct:

+- MyClass_Original
\+- MyClass
 \+- MyDerivedClass_Original
  \-- MyDerivedClass


The problem however is almost as I described: There is a method
Flow_Proxy_injectProperties in the generated MyClass, but it is only
called if MyClass is instantiated, not if MyDerivedClass is instantiated:

class MyClass extends MyClass_Original {
  public function __construct() {
    [...]
    if ('MyCompany\MyPackage\Domain\Model\MyClass'
        === get_class($this)) {
      $this->Flow_Proxy_injectProperties();
    }
  }
}

I don't know if there is any deeper consideration behind this, but I
don't see a reason why the settings injection is limited that way.


Regards

Andreas

- -- 
Foundata GmbH
Steinhäuserstraße 20
76135 Karlsruhe
mail at foundata.net

Sitz der Gesellschaft: Karlsruhe
Registergericht: Amtsgericht Mannheim, HRB 714807
Rechtsform: Gesellschaft mit beschränkter Haftung (GmbH)
Vertretungsberechtigte Geschäftsführer: Andreas Haerter, Andreas Wolf
USt-IdNr.: DE284122682

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iF4EAREIAAYFAlLIIdEACgkQRJlqDhrZfp3nygEAm6it5SKZ8dAQT9A/QdHmkMT1
vvX7gVvD+WUPGajrXdgA/3Wm2SgMgs52TVM2hHI8O9UYJ5GH2VBWbFpBjUTS8t02
=yoXT
-----END PGP SIGNATURE-----


More information about the Flow mailing list