Loads an asset from the currently loaded theme.

@param   string  $path  Relative path to the asset
@return  string  Full asset URL or path if outside docroot
515445
public function asset_path($path)
	{
		if ($this->active['path'] === null)
		{
			throw new \ThemeException('You must set an active theme.');
		}

		if ($this->active['asset_base'])
		{
			return $this->active['asset_base'].$path;
		}
		else
		{
			return $this->active['path'].$path;
		}
	}
588107
public function make($path)
    {
        $absolutePath = $this->buildAbsolutePath($path);

        $relativePath = $this->buildRelativePath($absolutePath);

        $asset = new Asset($this->files, $this->factory, $this->appEnvironment, $absolutePath, $relativePath);

        return $asset->setOrder($this->nextAssetOrder());
    }
1097357
private function resolveStylesheetUrl($path){
        $websource = WebsourceManager::singleton()->getWebsource($this->get(ThemeRegistry::WEBSOURCE));
        if(strpos($path , ThemeRegistry::WEBSOURCE) === 0) {
                return $websource->getAccessUrl(substr($path, strlen(ThemeRegistry::WEBSOURCE)));
        }
        else {
            $assetService = $this->getServiceManager()->get(AssetService::SERVICE_ID);
            return $assetService->getAsset($path);
        }
    }
287831
public function load($path)
    {
        $factory = $this;

        if (is_dir($path)) {
            foreach (Finder::create()->files()->name('*.php')->in($path) as $file) {
                require $file->getRealPath();
            }
        }

        return $factory;
    }
1348936
public function skinAsset($path = null)
    {
        $skinPath = Skin::getActive()->getPath($path, true);
        return Url::asset($skinPath);
    }
17754
public static function getAssetUrl(string $path = '') : string
    {
        if (static::$assetUrl === null) {
            static::$assetUrl = FileHelper::getAssetUrl(static::className());
        }
        ;
        return static::$assetUrl . $path;
    }
1334355
public static function load($path)
    {
        if (is_dir($path)) {
            foreach (preg_grep('/^\.env$/', scandir($path)) as $filename) {
                $filePath = rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . $filename;
                if (is_readable($filePath)) {
                    foreach (parse_ini_file($filePath) as $envKey => $envValue) {
                        putenv($envKey . '=' . $envValue);
                    }
                }
            }
        } else {
            throw new BaseException('Your path does not directory.');
        }
    }
421590
public function loadConfig($path)
    {
        //add extension to the config file
        $path = sprintf("%s.%s", $path, $this->config_file_extension);

        //lets try loading the config file data
        return $this->loader->load($path);
    }
1256
public static function _Load ($path)
	{
		
		// Check file exists
		
		if (!parent::_Exists ($path))
		{
			return FALSE;
		}
		
		// Set image resource
		
		$image	= FALSE;
		
		// Switch image type and load
		
		switch (self::_getMIME ($path))
		{
			
			// gif
			
			case IMAGETYPE_GIF:
				$image		= imagecreatefromgif ($path);
				break;
				
			// png	
			
			case IMAGETYPE_PNG:
				$resImg		= imagecreatefrompng ($path);
				break;
				
			// jpeg / default	
			
			default:
				$image		= imagecreatefromjpeg ($path);
				break;			
			
		}
		
		// Return image resource
		
		return $image;
		
	}
956782
public function setAsset($path)
	{		
		$url = $this->config['dir']['site'] . str_replace($this->config['dir']['asset'], '', $path);
		$this->assets[] = new Asset($path, $url);
	}
90965
public function getCollectionAsset($path)
    {
        if (!is_string($path)) {
            throw new Exception\RuntimeException(
                'Asset should be of type string. got ' . gettype($path)
            );
        }

        $asset = $this->resolveFile($path);

        if (empty($asset)) {
            throw new Exception\RuntimeException(
                'Unable to locate file: '.$path
            );
        }

        $this->getAssetFilterManager()->setFilters($path, $asset);

        return $asset;
    }
938880
protected function resolveFilePath($path)
    {
        //Returns, if it's a remote file
        if (is_url($path)) {
            return $path;
        }

        //If it a relative path, it can be a file from a plugin or a file
        //  relative to `APP/webroot/img/`
        if (!Folder::isAbsolute($path)) {
            $pluginSplit = pluginSplit($path);

            //Note that using `pluginSplit()` is not sufficient, because
            //  `$path` may still contain a dot
            $path = WWW_ROOT . 'img' . DS . $path;
            if (!empty($pluginSplit[0]) && in_array($pluginSplit[0], CorePlugin::loaded())) {
                $path = CorePlugin::path($pluginSplit[0]) . 'webroot' . DS . 'img' . DS . $pluginSplit[1];
            }
        }

        is_readable_or_fail($path);

        return $path;
    }
333675
public function buildAssetUrl(string $path) : string {
        return starts_with($path, '//') ? $path : $this->app['url']->asset($path);
    }
1142063
private function loadDirectory($path)
    {
        $directory = new RecursiveDirectoryIterator($path);
        $iterator = new RecursiveIteratorIterator($directory);
        $files = new RegexIterator($iterator, '/^[^\.](?:(?!\/\.).)+?\.php$/i');

        $fm = $this;

        foreach ($files as $file) {
            require $file->getPathName();
        }
    }
1285008
public function loadFile($path) {
        $content = trim(file_read($path));
        $config = [];

        if ( ! empty($content)) {
            $config = Yaml::parse($content);
        }

        return $config;
    }
86005
private function load_file( $path ) {
		if ( $path && is_readable( $path ) ) {
			include_once( $path );
			$success = true;
		}

		return ! ( empty( $success ) ) ? true : false;
	}
173251
public function cacher($path = '')
    {
        if (!$path) {
            $path = sys_get_temp_dir() . DIRECTORY_SEPARATOR;
        }
        $cache = new AssetCacher($path, $this->config->theme());
        $cache->configTimestamp($this->config->modifiedTime());
        $cache->filterRegistry($this->filterRegistry());
        return $cache;
    }