TroodoN-Mike
TroodoN-Mike

Reputation: 16165

How to reference bundle path in config.yml in symfony2

In order to make bundle work on its own i would like to call my class (Paypal) from a current bundle path. What is the way to do it?

#MyBundle/Resources/Config/config.yml
parameters:
    paypal.class:      **DontKnowWhatToPutHere**/Services/Paypal
    paypal.argument: exampleParam

services:
    paypal:
        class:        %paypal.class%
        arguments:    [%paypal.env%]

Thanks for any help

Upvotes: 2

Views: 519

Answers (1)

MDrollette
MDrollette

Reputation: 6927

You would use the namespaced class name...

FooVendor\BarBundle\Services\Paypal

Upvotes: 1

Related Questions