Check if view exists.

@param string $name

@return array|false
10163
public function exists($name, $nest = null)
    {
        $file = str_replace('.', '/', $name);

        $extensions = [
            '.php',
            '.atom.php',
            '.atom',
            '.tpl.php',
        ];

        if (!is_null($nest)) {
            $nest = $nest.'resources/views/';
        } elseif (!is_null($this->nest)) {
            $nest = $this->nest;
        } else {
            $nest = root().'resources/views/';
        }

        $i = 0;
        foreach ($extensions as $extension) {
            $path = $nest.$file.$extension;

            if (file_exists($path)) {
                if ($i == 0) {
                    $view = ['path' => $path, 'engine' => 'none'];
                } elseif ($i == 1 || $i == 2) {
                    $view = ['path' => $path, 'engine' => 'atomium'];
                } elseif ($i == 3) {
                    $view = ['path' => $path, 'engine' => 'smarty'];
                }

                return $view;
            }

            $i++;
        }

        return false;
    }
593855
public function exists($name)
    {
        if ($this->existsOnSpace(null, $name)) {
            return true;
        }

        foreach ($this->spacePaths as $space => $path) {
            if ($this->existsOnSpace($space, $name)) {
                return true;
            }
        }

        return false;
    }
243588
public function exists($name)
    {
        return $this->getLegacyKernel()->runCallback(
            static function () use ($name) {
                $legacyTemplate = eZTemplate::factory()->loadURIRoot($name, false, $extraParameters);

                return !empty($legacyTemplate);
            }
        );
    }
213367
public function has($name)
    {
        $path = explode('.', $name);
        $key = array_shift($path);

        if ($this->checkCache($key)) {
            return $path ? $this->cache[$key]->has($path) : true;
        }

        return false;
    }
523233
public function has($name)
    {
        $found = false;
        $this->elements->rewind();

        /** @var ElementInterface $element*/
        foreach ($this->elements as $element) {
            if ($element->getName() == $name) {
                $found = true;
                break;
            }
        }
        return $found;
    }
558497
public function exists($name)
    {
        if ($name instanceof Template) {
            return true;
        }

        $loader = $this->environment->getLoader();

        if ($loader instanceof ExistsLoaderInterface || method_exists($loader, 'exists')) {
            return $loader->exists((string) $name);
        }

        try {
            // cast possible TemplateReferenceInterface to string because the
            // EngineInterface supports them but LoaderInterface does not
            $loader->getSourceContext((string) $name)->getCode();
        } catch (LoaderError $e) {
            return false;
        }

        return true;
    }
1166245
public function propertyExists($name)
    {
        $properties = $this->getProperties();
        return empty($properties) || in_array($name, $properties);
    }
986546
public static function exists($view, $return_path = false)
	{
		if (starts_with($view, 'name: ') and array_key_exists($name = substr($view, 6), static::$names))
		{
			$view = static::$names[$name];
		}
		
		list($bundle, $view) = Bundle::parse($view);

		$view = str_replace('.', '/', $view);

		// We delegate the determination of view paths to the view loader event
		// so that the developer is free to override and manage the loading
		// of views in any way they see fit for their application.
		$path = Event::until(static::loader, array($bundle, $view));

		if ( ! is_null($path))
		{
			return $return_path ? $path : true;
		}

		return false;
	}
734842
public function getView($name)
    {
        if (!isset(self::$_controllers['view.'.$name])) {
            $view = $this->getController($name)->setView($name)->getView();
            self::$_controllers['view.'.$name] = $view;
        }

        return self::$_controllers['view.'.$name];
    }
970388
public function isFunctionExists($name)
    {
        $functions = $this->config->functions;
        if (array_key_exists($name, $functions)) {
            return ($functions[$name] !== null);
        }
        return function_exists($name);
    }
155455
public function exists($name): bool
    {
        $filename = $this->getFilename($name);
        if ($filename === false) {
            return false;
        }

        return true;
    }
962369
public static function exists($name) {
		$application = Application::get();

		if (!in_array($name, self::$definable_hooks)) {
			return false;
		}

		if (file_exists($application->path . '/config/Hook.php')) {
			require_once $application->path . '/config/Hook.php';
			$classname = 'Hook_' . ucfirst($application->name);

			if (method_exists($classname, $name)) {
				return true;
			}
		}

		return false;
	}
603849
public function exists(?string $name = null): bool
    {
        if ($name != null) {
            $fileInfo = new MFileInfo($name);
            return $fileInfo->exists();
        }

        return $this->fileInfo->exists();
    }
163526
public function has($name)
        {
            return Arrays::exists($name, $this->options) && false === empty($this->options[$name]) ;
        }
309578
public function exists($name)
    {
        if (!$this->validateCmsObject($name)) {
            return parent::exists($name);
        }

        return $this->obj->exists;
    }
1230091
public function has($name)
    {
        foreach ($this->filters() as $filter) {
            if ($filter->id() === $name) {
                return true;
            }
        }

        return false;
    }
391499
public function getView(string $name = '')
    {
        if (empty($name)) {
            $name = $this->getComponentsName();
        }

        $view = $this->MVCFactory($name, 'View');

        return $view;
    }