Get Locator asset.

@param Locator|string $locator Locator data or locator Id

@return Asset
513429
public function getLocatorAsset($locator)
    {
        $locatorId = Utilities::getEntityId(
            $locator,
            'WindowsAzure\MediaServices\Models\Locator'
        );

        return Asset::createFromOptions(
            $this->_getEntity("Locators('{$locatorId}')/Asset")
        );
    }
958338
protected function getResource(array $parts, ResourceLocatorInterface $locator)
    {
        if (!$locator instanceof WpLocator) {
            throw new \InvalidArgumentException('WP resource requires a wp locator');
        }

        return new WpResource($parts, $locator);
    }
923908
public function getResource($descriptor)
    {
        return isset($this->_pipes[$descriptor]) ? $this->_pipes[$descriptor] : null;
    }
640077
public function loadAssetHandler($assetHandler)
    {
        if (!$assetHandler instanceof AssetHandler) {
            throw new AssetManagerException('Asset handler "' . get_class($assetHandler) . '" is not supported by AssetManager');
        }
        $this->assetHandlers[] = $assetHandler;
        return $this;
    }
1273491
public function initializeLocator(UniformResourceLocator $locator)
    {
        $locator->reset();

        $schemes = (array) $this->get('streams.schemes', []);

        foreach ($schemes as $scheme => $config) {
            if (isset($config['paths'])) {
                $locator->addPath($scheme, '', $config['paths']);
            }

            $override = $config['override'] ?? false;
            $force = $config['force'] ?? false;

            if (isset($config['prefixes'])) {
                foreach ((array)$config['prefixes'] as $prefix => $paths) {
                    $locator->addPath($scheme, $prefix, $paths, $override, $force);
                }
            }
        }
    }
765323
public function asset($asset)
    {
        list($name, $url) = explode(':', $asset);

        $baseUrl = str_replace(public_path(), '', $this->getAssetsPath());

        $url = $this->app['url']->asset($baseUrl."/{$name}/".$url);

        return str_replace(['http://', 'https://'], '//', $url);
    }
1347190
public function findIn($asset, $namespace)
    {
        if (! isset($this->paths[$namespace])) {
            return null;
        }
        foreach ($this->paths[$namespace] as $path) {
            $file = $path['path'] . $asset;
            if (is_file($file)) {
                return $file;
            }
        }
        return null;
    }
723523
public function getLocator($name)
    {
        $locator = false;

        if($this->isRegistered($name)) {
            $locator = $this->__locators[$name];
        }

        return $locator;
    }
1231469
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $config = $serviceLocator->get('Config');
        return new AssetsOptions(isset($config['assets']) ? $config['assets'] : array());
    }
170575
public function getAssetLocatorList($asset)
    {
        $assetId = Utilities::getEntityId(
            $asset,
            'WindowsAzure\MediaServices\Models\Asset'
        );

        $locatorsList = $this->_getEntityList("Assets('{$assetId}')/Locators");

        $result = [];

        foreach ($locatorsList as $locator) {
            $result[] = Locator::createFromOptions($locator);
        }

        return $result;
    }
1227041
public function typeKeys($locator, $value)
    {
        try {
            return $this->getMinkSession()->getDriver()->getBrowser()->typeKeys($locator, $value);
        } catch (\Selenium\Exception $e) {
            sleep(1);
            return $this->getMinkSession()->getDriver()->getBrowser()->typeKeys($locator, $value);
        }
    }
1149942
public function getAssetsUrl(){
		if($this->_assetsUrl !== null){
			return $this->_assetsUrl;
		}

		$this->_assetsUrl = Yii::$app->getAssetManager()->publish(__DIR__);
		$this->_assetsUrl = $this->_assetsUrl[1];
		return $this->_assetsUrl;
	}
1322288
protected function getAssetsUrl($inputUrl)
    {
        /** @var $assets \Symfony\Component\Templating\Helper\CoreAssetsHelper */
        $assets = $this->getService('assets.packages');

        $url = preg_replace('/^asset\[(.+)\]$/i', '$1', $inputUrl);

        if ($inputUrl !== $url) {
            return $assets->getUrl($this->baseUrl . $url);
        }

        return $inputUrl;
    }
353438
protected function doFindLocalizedAsset($locale, $asset)
    {
        if (isset($this->assets[$locale][$asset])) {
            return $this->assets[$locale][$asset];
        }

        if (0 < $pos = strpos($locale, '_')) {
            return $this->doFindLocalizedAsset(substr($locale, 0, $pos), $asset);
        }

        return [];
    }
180405
public function getCollectorsLocator() {
		if ($this->collectorsLocator === null) {
			$this->collectorsLocator = new InitializerNamespace(self::NAMESPACE_COLLECTORS);
		}
		
		return $this->collectorsLocator;
	}
1345438
public function findByXpath($locator)
    {
        $locator = \Normalizer::normalize($locator, \Normalizer::FORM_D);
        return parent::find($locator);
    }
939476
public function get($id) {
		if (isset($this->_helpers[$id])) {
			return $this->_helpers[$id];
		}
		
		$helper = $this->loadHelper($id);
		
		if ($helper instanceof LocatorAwareInterface && ! $helper->hasLocator() && $this->hasLocator()) {
			$helper->setLocator($this->getLocator());
		}
		
		if ($helper instanceof HelpersBrokerAwareInterface && ! $helper->hasHelpersBroker()) {
			$helper->setHelpersBroker($this);
		}
		
		$this->_helpers[$id] = $helper;
		
		return $helper;
	}