public function set($type, $value, $useProperty = false)
    {
        $value = preg_replace('/\s\s+/', ' ', $this->trans($value));
        $keys = array();
        $keysProp = array();
        switch ($type) {
            case 'title':
                $keysProp[] = 'og:title';
                $keys[] = 'title';
                $keys[] = 'twitter:title';
                break;
            case 'description':
                $keysProp[] = 'og:description';
                $keys[] = 'description';
                $keys[] = 'twitter:description';
                break;
            case 'image':
                $keysProp[] = 'og:image';
                $keys[] = 'twitter:image:src';
                if (false === strpos($value, '://')) {
                    $value = $this->container->get(NyrodevService::class)->getFullUrl($value);
                }
                break;
            default:
                if ($useProperty) {
                    $keysProp[] = $type;
                } else {
                    $keys[] = $type;
                }
                break;
        }
        foreach ($keys as $k) {
            if ($value) {
                $this->metas[$k] = $value;
                if ('twitter:image:src' == $k) {
                    $this->metas['twitter:card'] = 'summary_large_image';
                }
            } elseif (isset($this->metas[$k])) {
                unset($this->metas[$k]);
                if ('twitter:image:src' == $k && isset($this->metas['twitter:card'])) {
                    unset($this->metas['twitter:card']);
                }
            }
        }
        foreach ($keysProp as $k) {
            if ($value) {
                $this->metasProp[$k] = $value;
            } elseif (isset($this->metasProp[$k])) {
                unset($this->metasProp[$k]);
            }
        }
    }