Jarves\AssetHandler\Container::getCompileHandlerByFileExtension PHP Method

getCompileHandlerByFileExtension() public method

public getCompileHandlerByFileExtension ( string $filePath ) : Jarves\AssetHandler\CompileHandlerInterface
$filePath string
return Jarves\AssetHandler\CompileHandlerInterface
    public function getCompileHandlerByFileExtension($filePath)
    {
        $exploded = explode('.', $filePath);
        $extension = array_pop($exploded);
        $extensionLong = array_pop($exploded) . '.' . $extension;
        if (isset($this->handlerByExtension[strtolower($extensionLong)])) {
            return $this->container->get($this->handlerByExtension[strtolower($extensionLong)]);
        }
        if (isset($this->handlerByExtension[strtolower($extension)])) {
            return $this->container->get($this->handlerByExtension[strtolower($extension)]);
        }
    }