@param string $name

@return FileContentArea|null
4203
public function getFile(string $name)
    {
        return $this->fileContentAreas->where(function (FileContentArea $contentArea) use ($name) {
            return $contentArea->name === $name;
        })->first();
    }
1116079
public static function getFormatTemplate($name) {
        $file = sprintf(
            '%s/Model/template/format/%s.html',
            __DIR__,
            $name
        );

        if (!file_exists($file)) {
            return null;
        }

        if (!isset(self::$templates[$name])) {
            self::$templates[$name] = file_get_contents($file);
        }

        return self::$templates[$name];
    }
285397
public function get(string $name): ?UploadedFileInterface
    {
        if (!isset($this->uploadedFiles[$name])) {
            return null;
        }

        return $this->uploadedFiles[$name];
    }
600801
public function getMetadata(string $name)
    {
        return $this->metadata->where(function (ContentMetadata $metadata) use ($name) {
            return $metadata->name === $name;
        })->first();
    }
1079770
public static function loadFromFile($name) {
        static $loader = null;
        if ($loader === null) {
            $loader = new ConfigurationLoader();
        }
        if (empty($name)) {
            return new Configuration('');
        } else {
            return $loader->loadConfig($name);
        }
    }
754457
public function createDocument($name)
    {
        foreach ($this->registry[DocumentExtension::class] as $extension) {
            $node = $extension->createDocument($this, $name);
            if ($node) {
                return $node;
            }
        }

        return null;
    }
395104
public function get(string $name): ?string
    {
        return $this->dataContainer[RequestDataContainer::VAR_HEADER_RAW][$name] ?? null;
    }
1030870
public function getFile($name)
    {
        if ($file = $this->resolveFile($name)) {
            return $file;
        } else {
            $components = $this->parseResource($name);
            throw new \RuntimeException(sprintf('Template "%s" not found in directories "%s"', $components['file'], implode('", "', $components['dirs'])));
        }
    }
116666
public function getPost(string $name) : ?string
    {
        $r = null;
        if ($this->contentType === "multipart/form-data" ||
            $this->contentType === "application/x-www-form-urlencoded") {
            $r = ((isset($this->parsedBody[$name]) === true) ? (string)$this->parsedBody[$name] : null);
        }
        return $r;
    }
421363
public function getHeader($name)
    {
        $name = mb_strtolower($name);
        return isset($this->headers[$name]) ? $this->headers[$name] : null;
    }
1063630
public function file(string $file, string $name = null) : self
    {
        $this->filePath = $file;

        if ( ! file_exists($file) || ! is_readable($file)) {
            throw new FileException('Cannot read file: ' . $file);
        }

        $this->fileName = $name ?? basename($this->filePath);
        $this->fileSize = filesize($file);

        return $this;
    }
913954
public function getImage(string $name)
    {
        /** @var ImageContentArea $contentArea */
        return $this->imageContentAreas->where(function (ImageContentArea $contentArea) use ($name) {
            return $contentArea->image->isValidImage() && $contentArea->name === $name;
        })->first();
    }
139711
private function getContent($name)
    {
        $filename = $this->getCacheFileName($name);
        if (!is_file($filename)) {
            return false;
        }

        if ($this->options['thread_safe']) {
            $fd = fopen($filename, 'r+');
            flock($fd, LOCK_SH);
            $fc = fread($fd, filesize($filename));
            fclose($fd);

            return $fc;
        } else {
            return file_get_contents($filename);
        }
    }
732298
public function simple($name, $index = 0)
    {
        if (!isset($this->storage[$name][$index]))
        {
            $files = &$this->files();

            if (empty($files[$name]))
            {
                return null;
            }

            $this->storage[$name][$index] = new Simple($files[$name], $index);
        }

        return $this->storage[$name][$index];
    }
1142713
public function download($path, $name = null)
    {
        $fResponse = new FileResponse($path);
        return $fResponse->forceDownload($name);
    }
673135
protected function getStubContent($name)
    {
        if (!isset(static::$stubs[$name])) {
            if (!is_file($path = base_path("resources/stubs/vendor/models-generator/$name.stub"))) {
                $path = __DIR__."/../../resources/stubs/$name.stub";
            }

            static::$stubs[$name] = file_get_contents($path);
        }

        return static::$stubs[$name];
    }
1279983
public function get($name, &$error = false){

		// If disabled, return nothing so that this cache is overwritten

		if(!$this->_enabled){

			return null;
		}

		try{

			$file = $this->_getFileName($name);
		}
		catch(CacheException $e){

			$error = true;

			return null;
		}

		if(time() > @filemtime($this->_cache_path . $file)){

			return null;
		}

		$contents = @file_get_contents($this->_cache_path . $file);

		if($contents !== false){

			error_clear_last();

			$value = @unserialize($contents);

			// Attempt to separate serialised "false" from unserialisation errors

			$last_error = error_get_last();

			if($value === false && $last_error !== null && $last_error['type'] === E_WARNING){

				$error = true;

				return null;
			}

			return $value;
		}

		return null;
	}