Get build value from metadata file.

@return null|string
350647
protected function buildStored()
    {
        return $this->files->exists($file_path = $this->config['build_metadata_path'])
            ? $this->files->get($file_path, $this->use_locking)
            : null;
    }
1118371
private function getMetadataNode()
    {
        $node = $this->createRootNode('metadata');
        return $node
            ->addDefaultsIfNotSet()
            ->children()
                ->arrayNode('drivers')
                    ->defaultValue(['default' => ['type' => 'yml']])
                    ->useAttributeAsKey('name')
                    ->prototype('array')
                        ->performNoDeepMerging()
                        ->children()

                            ->enumNode('type')->defaultValue('yml')
                                ->values(['yml', null])
                            ->end()
                            ->scalarNode('service')->cannotBeEmpty()->end()

                            ->arrayNode('parameters')
                                ->performNoDeepMerging()
                                ->prototype('variable')->end()
                            ->end()

                        ->end()
                    ->end()
                    ->validate()
                        ->always(function($v) {
                            $this->validateMetadataDrivers($v);
                            return $v;
                        })
                    ->end()
                ->end()

                ->arrayNode('cache')
                    ->canBeDisabled()
                    ->children()

                        ->enumNode('type')->defaultValue('file')
                            ->values(['file', 'binary_file', 'redis', null])
                        ->end()
                        ->scalarNode('service')->cannotBeEmpty()->end()

                        ->arrayNode('parameters')
                            ->performNoDeepMerging()
                            ->prototype('variable')->end()
                        ->end()

                    ->end()

                    ->validate()
                        ->always(function($v) {
                            $this->validateMetadataCache($v);
                            return $v;
                        })
                    ->end()
                ->end()
            ->end()
        ;
    }
57950
public function getContentEncoding() {
        if (!isset($this->metadata[OSSHeaders::CONTENT_ENCODING])) {
            return null;
        }
        return $this->metadata[OSSHeaders::CONTENT_ENCODING];
    }
1015072
public function getCreatedAt()
    {
        $metadata = $this->getMetadata();

        try {
            return isset($metadata['created']) ? Carbon::createFromTimestamp($metadata['created']) : null;
        } catch (Exception $e) {
            return;
        }
    }
594787
public function getMetadata()
    {
        if ($this->cacheGenerated !== null) {
            $xml = $this->getCacheItem($this->cacheId, $this->cacheTag);
            if ($xml !== null) {
                Logger::debug($this->logLoc.'Loaded generated metadata from cache.');
                return $xml;
            }
        }

        return $this->updateCachedMetadata();
    }
832074
public function metaData($key = null)
    {
        if (!$this->resource) {
            return null;
        }

        if (!$meta = stream_get_meta_data($this->resource)) {
            return null;
        }

        if (!$key) {
            return $meta;
        }

        return isset($meta[$key]) ? $meta[$key] : null;
    }
526858
public function evaluate()
    {
        if ($this->property === null) {
            throw new BuildException('Property name must be set.');
        }
        $value = $this->getProject()->getProperty($this->property);

        return $value === null || !Project::toBoolean($value);
    }
147562
public function getMetadata($key)
    {
        if (!is_array($this->metadata)) {
            $this->metadata = json_decode(json_encode($this->metadata), true);
        }
        return (isset($this->metadata[$key])) ? $this->metadata[$key] : null;
    }
968360
public function findConfigFile()
    {
        if (file_exists($this->phpci->buildPath . DIRECTORY_SEPARATOR . '.sendxmpprc')) {
            if (md5(file_get_contents($this->phpci->buildPath . DIRECTORY_SEPARATOR . '.sendxmpprc'))
                !== md5($this->getConfigFormat())) {
                return null;
            }

            return true;
        }

        return null;
    }
290035
final protected function getMetadata($name)
    {
        return isset($this->metadata[$name]) ? $this->metadata[$name] : null;
    }
1140756
public function getMetadataPath()
    {
        $sModulePath = $this->getModuleFullPath();
        if (substr($sModulePath, -1) != DIRECTORY_SEPARATOR) {
            $sModulePath .= DIRECTORY_SEPARATOR;
        }

        return $sModulePath . 'metadata.php';
    }
780324
public function getMetadataForFile(string $file): ?BenchmarkMetadata
    {
        $hierarchy = $this->reflector->reflect($file);

        if ($hierarchy->isEmpty()) {
            return null;
        }

        try {
            $top = $hierarchy->getTop();
        } catch (\InvalidArgumentException $exception) {
            return null;
        }

        if (true === $top->abstract) {
            return null;
        }

        $metadata = $this->driver->getMetadataForHierarchy($hierarchy);
        $this->validateBenchmark($hierarchy, $metadata);

        // validate the subject and load the parameter sets
        foreach ($metadata->getSubjects() as $subject) {
            $this->validateSubject($hierarchy, $subject);
            $paramProviders = $subject->getParamProviders();
            $parameterSets = $this->reflector->getParameterSets($metadata->getPath(), $paramProviders);

            foreach ($parameterSets as $parameterSet) {
                if (!is_array($parameterSet)) {
                    throw new \InvalidArgumentException(sprintf(
                        'Each parameter set must be an array, got "%s" for %s::%s',
                        gettype($parameterSet),
                        $metadata->getClass(),
                        $subject->getName()
                    ));
                }
            }
            $subject->setParameterSets($parameterSets);
        }

        return $metadata;
    }
172312
protected function getPropertyValue()
    {
        if (!$this->viewHelperVariableContainer->exists(\TYPO3\Fluid\ViewHelpers\FormViewHelper::class, 'formObject')) {
            return null;
        }
        $formObject = $this->viewHelperVariableContainer->get(\TYPO3\Fluid\ViewHelpers\FormViewHelper::class, 'formObject');
        $propertyNameOrPath = $this->arguments['property'];
        return ObjectAccess::getPropertyPath($formObject, $propertyNameOrPath);
    }
673561
public function getErrorMetadata()
	{
		try
		{
			$metadata = \Sifo\Config::getInstance()->getConfig( 'lang/metadata_' . $this->getParam( 'lang' ) );
		}
		catch ( Exception_Configuration $e )
		{
			$metadata = \Sifo\Config::getInstance()->getConfig( 'lang/metadata_en_US' );
		}

		$error_code = $this->getParam( 'code' );

		return ( isset( $metadata[$error_code] ) ) ? $metadata[$error_code] : false;
	}
461900
public function getBytes()
    {
        if ($this->isDirty && $this->bytes) {
            return $this->bytes;
        }
        if ($this->isDirty && $this->filename) {
            return file_get_contents($this->filename);
        }
        if ($this->riakGridFSFile instanceof \RiakGridFSFile) {
            return $this->riakGridFSFile->getBytes();
        }
        return null;
    }
80715
public function getMetadata(): Data
    {
        if ($this->_metadata === null) {
            $this->_metadata = new Data();

            $this->setMetadata([]);
        }

        return $this->_metadata;
    }
730313
protected function read_version_file() {
		$retval = NULL;
		
		//okay, all files present: check the version in the VERSION file.
		if(file_exists($this->versionFileLocation)) {
			$versionFileContents = file_get_contents($this->versionFileLocation);
			
			$versionMatches = array();
			preg_match_all('/\nVERSION: (.*)\n/', $versionFileContents, $versionMatches);
			if(count($versionMatches) == 2 && count($versionMatches[1]) == 1) {
				$this->versionFileVersion = $this->get_full_version_string(trim($versionMatches[1][0]));
				$retval = $this->versionFileVersion;

				//now retrieve the PROJECT name.
				$projectMatches = array();
				preg_match_all('/\nPROJECT: (.*)\n/', $versionFileContents, $projectMatches);
				if(count($projectMatches) == 2 && count($projectMatches[1]) == 1) {
					$this->projectName = trim($projectMatches[1][0]);
				}
				else {
					$this->error_handler(__METHOD__ .": failed to find PROJECT name");
				}
			}
			else {
				$this->error_handler(__METHOD__ .": could not find VERSION data");
			}
		}
		else {
			$this->error_handler(__METHOD__ .": Version file (". $this->versionFileLocation .") does not exist");
		}
		
		return($retval);
	}