public function addProvider(PathProviderInterface $provider, $priority = 0)
    {
        $this->providers[$priority][] = $provider;
        $this->sorted                 = null;
    }
public function addProvider(PathProviderInterface $provider, $priority = 0)
    {
        $this->providers[$priority][] = $provider;
        $this->sorted                 = null;
    }
public function addProvider ( PathProviderInterface $ provider , $ priority = 0 ) { $ this -> providers [ $ priority ] [ ] = $ provider ; $ this -> sorted = null ; }
For automatically injecting provider should be registered as DI service
with tag layout.resource.path_provider

@param PathProviderInterface $provider
@param int                   $priority
For automatically injecting provider should be registered as DI service with tag layout . resource . path_provider