Register the given stylesheet into the list of requirements.

@param string $file The CSS file to load, relative to site root
@param string $media Comma-separated list of media types to use in the link tag
(e.g. 'screen,projector')
166999
public function css($file, $media = null)
    {
        $file = ModuleResourceLoader::singleton()->resolvePath($file);

        $this->css[$file] = [
            "media" => $media
        ];
    }
792222
public static function addFile($file, $type = '')
    {
        
		if(empty($type)){
			if(preg_match("/\.".tao_helpers_Scriptloader::CSS."$/", $file)){
				$type = tao_helpers_Scriptloader::CSS;
			}
			if(preg_match("/\.".tao_helpers_Scriptloader::JS."$/", $file)){
				$type = tao_helpers_Scriptloader::JS;
			}
		}
		switch(strtolower($type)){
			case tao_helpers_Scriptloader::CSS: self::$cssFiles[] = $file; break;
			case tao_helpers_Scriptloader::JS:  self::$jsFiles[]  = $file; break;
			default:
				throw new Exception("Unknown script type for file : ".$file);
		} 
        
    }
981826
protected function _addDependency(string $file): void
    {
        $file = str_replace('\\', '/', $file);
        if (!in_array($file, $this->_dependencies)) {
            $this->_dependencies[] = $file;
        }
    }
223803
public function registerAssetCss($cssFile, $media = '')
    {
        Yii::app()->getClientScript()->registerCssFile($this->getAssetsUrl() . "/css/{$cssFile}", $media);
        return $this;
    }
500846
public function load($file)
    {
        if (!file_exists($file)) {
            throw new \RuntimeException(sprintf('The file "%s" does not exists', $file));
        }

        $content = file_get_contents($file);

        // HACK: DOMNode seems to bug when a node is named "param"
        $content = str_replace('<param', '<parameter', $content);
        $content = str_replace('</param', '</parameter', $content);

        $crawler = new Crawler();
        $crawler->addContent($content, 'xml');

        foreach ($crawler->filterXPath('//function') as $node) {
            $method = $this->getMethod($node);
            $this->specification->addMethod($method);
        }
    }
1201959
public function loadCSS($file, $priority = 100) {
		if (!isset($this->controller)) {
			if (DEBUG_MODE) {
				BLog::addToLog('[MVC.View]: Could not load css file, because controller is empty!', LL_ERROR);
			}
			return false;
		}
		if (!file_exists($file)) {
			if (DEBUG_MODE) {
				BLog::addToLog('[MVC.View]: Could not load css file, because it does not exists!', LL_ERROR);
			}
			return false;
		}
		$src = file_get_contents($file);
		if (!empty($src)) {
			$this->addCSSDeclaration($src);
		}
		return true;
	}
1351261
public function addFile($file) {
        $baseName = basename($file, '.php');

        $components = explode('.', $baseName);
        $language = $components[1];

        $data = require($file);

        $this->add($data, $language);
    }
1288142
public function loadOneFile($file, $language = "default") {
        //$folder is not set ... even remove this line should or initiate $folder
		$this->folder = $folder;
		
		$msg = array();
		@include($file);

		$this->msg = $msg;
	}
1110034
public function load(string $file)
    {
        $this->data = Yaml::parse(file_get_contents($file));
        $this->filename = basename($file);
    }
913995
public static function highlight($file)
    {
        $highlightFileFunc = new \ReflectionFunction('highlight_file');
        if (!$highlightFileFunc->isDisabled()) {
            highlight_file($file);
        } else {
            echo '<pre>' . htmlspecialchars(file_get_contents($file)) . '</pre>';
        }
    }
402189
public function addResource(string $file): void
    {
        $contents = file_get_contents($file);
        
        if ($contents === false) {
            throw new \RuntimeException("Error reading file at $file.");
        }
        
        $this->processData(json_decode($contents, true));
    }
235881
public function registerBundle($files, $destination = null, $extension = null)
    {
        if (!is_array($files)) {
            $files = [$files];
        }

        $firstFile = array_values($files)[0];

        if ($extension === null) {
            $extension = File::extension($firstFile);
        }

        $extension = strtolower(trim($extension));

        if ($destination === null) {
            $file = File::name($firstFile);
            $path = dirname($firstFile);
            $preprocessors = array_diff(self::$cssExtensions, ['css']);

            if (in_array($extension, $preprocessors)) {
                $cssPath = $path.'/../css';
                if (
                    in_array(strtolower(basename($path)), $preprocessors) &&
                    File::isDirectory(File::symbolizePath($cssPath))
                ) {
                    $path = $cssPath;
                }
                $destination = $path.'/'.$file.'.css';
            }
            else {
                $destination = $path.'/'.$file.'-min.'.$extension;
            }
        }

        $this->bundles[$extension][$destination] = $files;

        return $this;
    }
629433
public function register($file)
    {
        $theme = json_decode(file_get_contents($file), true);

        $validator = $this->getValidationFactory()->make($theme, [
            'name'        => 'required',
            'theme'       => 'required',
            'type'        => 'required',
            'version'     => 'required',
            'description' => 'required',
            'positions'   => 'required',
        ]);

        if ($validator->fails()) {
            throw new \Exception('Invalid theme configuration: ' . $file->getRealPath());
        }

        $this->themes[$theme['type'] . '.' . $theme['theme']] = new Theme(
            $theme['name'],
            $theme['theme'],
            $theme['type'],
            $theme['version'],
            $theme['description'],
            (array) $theme['positions'],
            $theme
        );
    }
241214
public function chmod($file, $mode)
    {
        if (!chmod($this->alias->resolve($file), $mode)) {
            throw new RuntimeException(['chmod `:file` file to `:mode` mode failed: :last_error_message', 'file' => $file, 'mode' => $mode]);
        }
    }
252357
protected function registerAssets($files)
    {
        foreach ($files as $type => $_files) {
            if ($type == 'script') {
                foreach ($_files as $file) {
                    $this->view->registerJsFile($this->assetUrl . $file);
                }
            } else {
                foreach ($_files as $file) {
                    $this->view->registerCssFile($this->assetUrl . $file);
                }
            }
        }
    }
616679
public function requireFile($file)
    {
        if (PHP_EOL !== "\n" && strpos($file, 'phar://') !== 0) {
            $realPath = strtr(realpath($file), '\\', '/');
            if ($realPath !== $file) {
                trigger_error("File name ($realPath) case mismatch for .$file", E_USER_ERROR);
            }
        }
        /** @noinspection PhpIncludeInspection */
        require $file;
    }
1269505
protected function loadJs($file, array $properties = [])
    {
        if (!isset($this->loaded_js[$file])) {
            $this->loaded_js[$file] = true;

            $properties = array_merge($properties, [
                'type' => 'text/javascript',
                'src' => $file,
            ]);

            echo $this->buildElement('script', $properties);
        }
    }