Cria View Assets CSS
@param string $name
@param array $data
@param string $pathFile
188911
private function createPageCss(string $name, array $data, string $pathFile)
    {
        $minifier = new Minify\CSS("");

        if (!empty($this->param['css']) && is_array($this->param['css'])) {
            foreach ($this->param['css'] as $item) {
                $datum = array_values(array_filter(array_map(function ($d) use ($item) {
                    return $d['nome'] === $item ? $d : [];
                }, $data)));

                if (!empty($datum[0])) {
                    $datum = $datum[0];

                    if (!empty($datum['arquivos'])) {
                        foreach ($datum['arquivos'] as $file) {
                            if ($file['type'] === "text/css")
                                $minifier->add($file['content']);
                        }
                    }
                }
            }
        }

        if (file_exists(PATH_HOME . $pathFile . "assets/{$name}.css"))
            $minifier->add(file_get_contents(PATH_HOME . $pathFile . "assets/{$name}.css"));
        elseif (file_exists(PATH_HOME . $pathFile . "assets/{$name}.min.css"))
            $minifier->add(file_get_contents(PATH_HOME . $pathFile . "assets/{$name}.min.css"));

        $minifier->minify(PATH_HOME . "assetsPublic/view/{$name}.min.css");

        //Ajusta diretório dos assets
        $file = file_get_contents(PATH_HOME . "assetsPublic/view/{$name}.min.css");
        $file = str_replace("../", "", $file);
        $f = fopen(PATH_HOME . "assetsPublic/view/{$name}.min.css", "w");
        fwrite($f, $file);
        fclose($f);

    }
348882
public function addLoadedFile(string $name, string $pathFile)
    {
        $properties                     = $this->getProperties();
        $loadedFiles                    = $properties['loadedFiles'];
        $names                          = array_column($loadedFiles, 'name');
        if (!in_array($name, $names)) {
            $key                        = '1ld';
            if (!empty($loadedFiles)) {
                $loadedFiles                = ksort($loadedFiles);
                /** @var array $loadedFiles */
                $key                        = ((int) array_key_last($loadedFiles) + 1).'ld';
            }
            $item                       = [];
            $item['name']               = $name;
            $item['pathFile']           = $pathFile;
            $item['mime']               = mime_content_type($pathFile);
//            $loadedFiles[$name]         = $pathFile;
            $loadedFiles[$key]          = $item;
            $properties['loadedFiles']  = $loadedFiles;
            $this->setProperties($properties);
            return $this;
        }
        return false;
    }
295537
public function save($name, $data)
    {
        try {
            return $this->loader($name)->save($data);
        } catch (NotFound\Path $exception) {
            File::touch($this->buildPath($name, $this->extensions[0]));
            return $this->save($name, $data);
        }
    }
1299147
public function renderView($name, $data = array(), $return = FALSE)
    {
        $file = $this->getViewPath($name);
        return $this->loadView($file, $data, $return);
    }
1289965
public static function extend($name, $data = null)
    {
        return self::$view->call($name, $data)->show();
    }
680012
public function getUri(string $name, array $data = [], $warnData = true) : Uri
    {
        if (!isset($this->routes[$name])) {
            throw new \InvalidArgumentException(sprintf("Invalid route name '%s'", $name));
        }

        $route = $this->routes[$name];

        $uri = self::request()->getUri();
        $uri->removeAllQueries()
            ->setFragment(null)
            ->setPath($this->routeRegexp($route, $data))
        ;

        // $cloneData = $data;

        // append querystring
        if ($route->getUserInputs()) {
            $queryToAdd = [];
            foreach ($route->getUserInputs() as $querystring) {
                if (!isset($data[$querystring->getName()]) &&
                    $querystring->isMandatory() &&
                    $warnData &&
                    $route->getHttpMethod() != 'POST' &&
                    $route->getHttpMethod() != 'PUT' &&
                    $route->getHttpMethod() != 'DELETE'
                ) {
                    throw new \InvalidArgumentException(sprintf(
                        "Missing querystring '%s' to generate route '%s'",
                        $querystring->getName(),
                        $route->getName()
                    ));
                }

                if (isset($data[$querystring->getName()])) {
                    // unset($cloneData[$querystring->getName()]);
                    $queryToAdd[$querystring->getName()] = $data[$querystring->getName()];
                }
            }

            $uri->addQueries($queryToAdd);
        }

        /*
        // Args can be consumed by routeRegexp and not remove from cloneData
        if (sizeof($cloneData)) {
            throw new \InvalidArgumentException(sprintf(
                "Too many data to generate route '%s' with keys %s",
                $route->getName(),
                "'" . implode("', '", array_keys($cloneData)) . "'"
            ));
        }
        */

        return $uri;
    }
164684
public function getView($name, $data = [])
    {
        $view = 'missing-page';

        if (view()->exists('page::' . $name)) {
            $view = $name;
        }

        return view('page::' . $view, $data);
    }
237209
public function viewIf($condition, string $name, array $data = null)
    {
        return $this->addIf($condition, View::create($name, $data));
    }
20290
public function render($name, array $data = [])
    {
        
        //$templatePath = $this->manager->pathByName($name);
        $template = $this->twig->load($name);
        return $template->render($data);
    }
1248477
protected function view($name, array $data = [])
    {
        $name = is_null($this->viewNamespace) ? $name : "{$this->viewNamespace}::$name";

        return parent::view($name, $data);
    }
99282
protected function parseCssProperty($name, $args = [])
    {
        if ($name === 'text') {
            return 'text()';
        }

        if ($name === 'attr') {
            $attributes = [];

            foreach ($args as $attribute) {
                $attributes[] = sprintf('name() = "%s"', $attribute);
            }

            return sprintf('@*[%s]', implode(' or ', $attributes));
        }

        throw new RuntimeException('HTML_E_INVALID_CSS_PROPERTY');
    }
367306
public function addCss($name, $media = '', $data = '') {
		$lnk = array();
		$lnk['rel'] = 'stylesheet';
		$lnk['href'] = $name;
		$lnk['data'] = $data;
		$lnk['type'] = 'text/css';
		if (!empty($media)) {
			$lnk['media'] = $media;
		}
		return $this->addLink($lnk);
	}
347659
public function image($url, $name = null, $attributes = array())
	{
		$attributes['src'] = $this->url->asset($url);

		return $this->input('image', $name, null, $attributes);
	}
1084623
public static function parseComposerExtraList($composerExtra, $name, $pathDist) {
		
		// move assets to the base directory
		if (isset($composerExtra["dist"]["baseDir"])) {
			self::parseFileList($name,$pathDist,Config::getOption("baseDir"),$composerExtra["dist"]["baseDir"]);
		}
		
		// move assets to the public directory
		if (isset($composerExtra["dist"]["publicDir"])) {
			self::parseFileList($name,$pathDist,Config::getOption("publicDir"),$composerExtra["dist"]["publicDir"]);
		}
		
		// move assets to the source directory
		if (isset($composerExtra["dist"]["sourceDir"])) {
			self::parseFileList($name,$pathDist,Config::getOption("sourceDir"),$composerExtra["dist"]["sourceDir"]);
		}
		
		// move assets to the scripts directory
		if (isset($composerExtra["dist"]["scriptsDir"])) {
			self::parseFileList($name,$pathDist,Config::getOption("scriptsDir"),$composerExtra["dist"]["scriptsDir"]);
		}
		
		// move assets to the data directory
		if (isset($composerExtra["dist"]["dataDir"])) {
			self::parseFileList($name,$pathDist,Config::getOption("dataDir"),$composerExtra["dist"]["dataDir"]);
		}
		
		// move assets to the components directory
		if (isset($composerExtra["dist"]["componentDir"])) {
			$templateExtension = isset($composerExtra["templateExtension"]) ? $composerExtra["templateExtension"] : "mustache";
			$onready           = isset($composerExtra["onready"]) ? $composerExtra["onready"] : "";
			$callback          = isset($composerExtra["callback"]) ? $composerExtra["callback"] : "";
			$componentDir      = Config::getOption("componentDir");
			self::parseComponentList($name,$pathDist,$componentDir."/".$name,$composerExtra["dist"]["componentDir"],$templateExtension,$onready,$callback);
			self::parseFileList($name,$pathDist,$componentDir."/".$name,$composerExtra["dist"]["componentDir"]);
		}
		
		// see if we need to modify the config
		if (isset($composerExtra["config"])) {
			
			foreach ($composerExtra["config"] as $option => $value) {
				
				// update the config option
				Config::updateConfigOption($option,$value);
				
			}
			
		}
		
	}
1353273
protected static function uri(string $name, array $data = [], $warnData = true) : Uri
    {
        return self::router()->getUri($name, $data, $warnData);
    }
277542
public function renderFile($name, array $attrs = array(), $urlType = UrlType::CDN)
    {
        $this->checkCache($name);

        return $this->files[$name]->render($attrs, $urlType);
    }
1042223
public function rmLoadedFile(string $name, string $pathFile)
    {
        $properties                     = $this->getProperties();
        $loadedFiles                    = $properties['loadedFiles'];
        $names                          = array_column($loadedFiles, 'name');
        if (file_exists($pathFile) && array_key_exists($name, $names)) {
            $key = array_search($name, array_column($loadedFiles, 'name'));
            unset($loadedFiles[$key]);
            $properties['loadedFiles']  = $loadedFiles;
            $this->setProperties($properties);
            return $this;
        }
        return false;
    }