{@inheritDoc} Checks the meta for missing or invalid values

@param string     $name
@param array|null $meta

@return static
@throws \LogicException Missing 'converter' or 'format' option in the $meta
768868
public function setNamespace( string $name, array $meta = null ) {

    // 'converter' enables text file conversion, 'format' is used to create files with the correct extension
    if( $meta !== null && ( empty( $meta[ 'converter' ] ) || empty( $meta[ 'format' ] ) ) ) {
      throw new \LogicException( "There must be a 'converter' and a 'format' in the namespace meta" );
    }

    return parent::setNamespace( $name, $meta );
  }
278652
public function getMetaValue($name)
    {
        /** @var PostMeta $meta */
        foreach ($this->getMetas() as $meta) {
            if ($name == $meta->getKey()) {
                return $meta->getValue();
            }
        }

        return;
    }
685062
public function getMeta($name)
    {
        $node = $this->filterXPath('descendant-or-self::meta[@name = \'' . $name . '\']')->getNode(0);
        if ($node instanceof \DOMElement) {
            return $node->getAttribute('content');
        } else {
            return null;
        }
    }
331871
protected function getMeta(string $name = null): array
    {
        return self::query($this->db->createDesc($name ? $name : $this->tableName));
    }
1004725
public function format($mode, $name, $data)
    {
        if ($mode === 'cast') {
            throw new InvalidArgumentException("Use `Schema::cast()` to perform casting.");
        }
        if (!isset($this->_columns[$name])) {
            // Formatting non defined columns or relations doesn't make sense, bailing out.
            return $this->convert($mode, '_default_', $data, []);
        }
        $column = $this->_columns[$name];
        $isNull = $data === null;
        $type = $isNull ? 'null' : $this->type($name);

        if (!$column['array']) {
            $data = $this->convert($mode, $type, $data, $column);
        } else {
            $data = Collection::format($mode, $data);
        }
        if (!$isNull && !empty($column['format'])) {
            $data = $this->convert($mode, $column['format'], $data, $column);
        }
        return $data;
    }
1304806
protected function buildFormOptions($name, array $field, $data = null)
    {
        // Allow sub options structure (collection case)
        if (isset($field['options']['constraints'])) {
            $field['options']['options'] = $this->buildFormOptions('', $field['options']);
        }

        $constraints = array();
        foreach ($field['constraints'] as $constraint) {
            $constraints[] = $this->buildConstraint($constraint);
        }

        $field['options']['constraints'] = $constraints;

        if (null !== $data && isset($data[$name])) {
            $field['options']['data'] = $data[$name];
        }

        return $field['options'];
    }
1081814
public function get($name, $param, $meta = false)
	{
		$fileDir = $this->cache . '/' . $name;
		$filePath = $fileDir . '/' . $param . '.json';
		if(!is_file($filePath))
		{
			return null;
		}
		$object = json_decode(file_get_contents($filePath), true);
		if($meta)
		{
			return $object;
		}
		return $object['data'];
	}
804598
public function getMetaByKey($name)
    {
        $criteria = Criteria::create();
        $criteria->where(Criteria::expr()->eq('key', $name));

        return $this->metas->matching($criteria);
    }
715926
public static function getExtConf($name, $default = null)
    {
        static $conf = null;
        $ret = $default;

        if ($conf === null) {
            // Load ext conf
            $conf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['metaseo']);
            if (!is_array($conf)) {
                $conf = array();
            }
        }

        if (isset($conf[$name])) {
            $ret = $conf[$name];
        }


        return $ret;
    }
1246802
public function validate($name, $data, $format = null)
    {
        if (!is_string($data)) {
            throw new Exception("propriedade [ {$name} ] é inválida para tipo [ string ] definido no schema", 400);
        }

        if ($format) {
            $data = self::applyFormat($format, $data);
        }

        return (string)$data;
    }
948309
public function meta($name, $value = null) {
        if ($value !== null) {
            $this->currentSchema[Cli::META][$name] = $value;
            return $this;
        }
        if (!isset($this->currentSchema[Cli::META][$name])) {
            return null;
        }
        return $this->currentSchema[Cli::META][$name];
    }
917158
public function zip(string $name = null)
    {
        if (count($this->views) === 0) {
            throw new \LogicException('You need to generate() first');
        }

        Utils::checkOutput('ZIP');

        $file = tmpfile();
        $filepath = stream_get_meta_data($file)['uri'];

        $zip = new \ZipArchive();
        $zip->open($filepath, \ZipArchive::OVERWRITE);
        foreach ($this->views as $view) {
            $zip->addFromString($view['name'], $view['file']->getContents());
        }
        $zip->close();

        $name = BankInterchange\Utils::addExtension(
            $name ?? 'download',
            '.zip'
        );

        header('Content-Type: application/zip');
        header('Content-Length: ' . filesize($filepath));
        header('Content-Disposition: attachment; filename="' . $name . '"');
        readfile($filepath);
        unlink($filepath);
    }
991127
final public function getOption($name)
    {
        if (!isset($this->options[$name])) {
            throw new \LogicException(sprintf('The option "%s" don\'t exists.', $name));
        }
        return $this->options[$name];
    }
1153939
public static function validateReleaseFormat($name)
    {
        self::validateReleaseFormatForHyphen($name);
        list($adjective, $noun) = explode('-', $name);

        if ($adjective[0] != $noun[0]) {
            throw new \Exception('Invalid combination of release name: ' . $name);
        }
    }
834391
private static function checkValidate(Meta $m)
    {
        if (!empty($m->getAllow()['validate'])) {
            if ($m->getAllow()['validate'] === "email" && !Check::email($m->getValue()))
                $m->setError("email inválido.");

            elseif ($m->getAllow()['validate'] === "cpf" && !Check::cpf($m->getValue()))
                $m->setError("CPF inválido.");

            elseif ($m->getAllow()['validate'] === "cnpj" && !Check::cnpj($m->getValue()))
                $m->setError("CNPJ inválido.");
        }
    }
58999
public static function buildDynamicMetadata($name, array $metadata)
    {
        $metaClass = self::getDynamicMetadataClassName($name);
        if (class_exists($metaClass)) {
            /* @var DynamicMetadataInterface $metaClass */
            return  $metaClass::createFromDecodedJsonResponse($metadata);
        }

        return null;
    }
439324
public function getArgument($name) {
        if (!$this->docoptResult)
            return null;

        if ($this->isArgument($name)) {
            $value = $this->docoptResult[$name];
            if (is_array($value))
                return $value ? $value[0] : null;
            return $value;
        }
        return null;
    }