Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a setter for public property "localfile" #76

Open
sweiguny opened this issue Jul 24, 2017 · 1 comment
Open

Provide a setter for public property "localfile" #76

sweiguny opened this issue Jul 24, 2017 · 1 comment

Comments

@sweiguny
Copy link

I am using symfony and phpbrowscap as service defined in services.yml.

currently, my definition in services.yml look like this:

browscap:
        class: phpbrowscap\Browscap
        arguments:
            - %browscap_cache_dir%

I'd like to set the property "localfile" initially, but thats not possible in services.yml, because it only allows to inject variables in the constructor and/or additionally calling a certain setter.

having this setter would help here.
i personally don't see a reason for not having a setter.

@sweiguny
Copy link
Author

Fixed that by adding this:

        properties:
            localfile: %browscap_ini%

but anyway, a setter would be great.

as i am facing the issue, that browscap loads the file from the server, even when i set localfile, i think the setter should also prevent the class to load the file from the server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant