Your IP : 216.73.216.84


Current Path : /home/helpink/www/libraries/vendor/php-tuf/php-tuf/src/Metadata/
Upload File :
Current File : /home/helpink/www/libraries/vendor/php-tuf/php-tuf/src/Metadata/FileInfoMetadataBase.php

<?php

namespace Tuf\Metadata;

/**
 * Base class for metadata objects that store information about other metadata files.
 */
abstract class FileInfoMetadataBase extends MetadataBase
{
    /**
     * Gets file information value under the 'meta' key.
     *
     * @param string $key
     *   The array key under 'meta'.
     * @param boolean $allowUntrustedAccess
     *   Whether this method should access even if the metadata is not trusted.
     *
     * @return array|null
     *   The file information if available or null if not set.
     */
    public function getFileMetaInfo(string $key, bool $allowUntrustedAccess = false): ?array
    {
        $this->ensureIsTrusted($allowUntrustedAccess);
        $signed = $this->getSigned();
        return $signed['meta'][$key] ?? null;
    }
}