protected function locateResource($asset = null)
    {
        if (null === $asset) {
            $asset = $this->asset;
        }

        $asset = $this->normalizePath($asset);
        if(\substr($asset, 0, 1) != '@') $asset = '@' . $asset;

        try
        {
            // Fetches the relative resource to locate from asset
            preg_match('/(@[^\/]+)?([\w\/\.\-_]+)?/', $asset, $match);
            if (empty($match[1])) {
                return;
            }

            $resource = $this->kernel->locateResource($match[1]);
            
            $resourceLength = strlen($resource) - 1;
            if (substr($resource, $resourceLength, 1) == '/') $resource = substr($resource, 0, $resourceLength);

            return (isset($match[2])) ? $resource . $match[2] : $resource;
        }
        catch(\Exception $e)
        {
            return null;
        }
    }