public function setName($name)
    {
        if (!preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/', $name)) {
            throw new \InvalidArgumentException(sprintf('Invalid name for metadata: `%s`.', $name));
        }

        $this->name = $name;

        return $this;
    }