[FLOW3-general] Passing settings to objects constructor in Objects.yaml
Rens Admiraal
renst3 at e-rank.nl
Tue May 18 14:23:38 CEST 2010
I wonder why you always run into an answer accidentally after posting it on
the mailinglist... but I found the right way to pass options to an
authenticationprovider... :-)
Here's how:
FLOW3:
security:
authentication:
providers:
DefaultProvider:
providerClass: F3\Package\Security\Authentication\Provider\LDAP
options:
option1: value
option2: value
-----Original Message-----
From: flow3-general-bounces at lists.typo3.org
[mailto:flow3-general-bounces at lists.typo3.org] On Behalf Of Rens Admiraal
Sent: dinsdag 18 mei 2010 8:58
To: flow3-general at lists.typo3.org
Subject: [FLOW3-general] Passing settings to objects constructor in
Objects.yaml
I've a class in my package to which I want to pass settings from the
Settings.yaml file of my package. The class implements the
AuthenticationProviderInterface, and the constructor method has 2 arguments
($name, array $options).
In my Settings.yaml file I have something like:
Package:
security:
authentication:
LDAP:
base_dn: 'dc=domain,dc=com'
and in my Objects.yaml file I have:
F3\Package\Security\Authentication\Provider\LDAP:
arguments:
2:
setting: Package.security.authentication.LDAP
Now I expect the $options array to contain an array with 1 value with index
'base_dn', but the array is empty. What part of the documentation did I
miss? J
Greetz,
Rens
_______________________________________________
FLOW3-general mailing list
FLOW3-general at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/flow3-general
More information about the FLOW3-general
mailing list