OpenGraph\Opengraph::addMeta PHP Method

addMeta() public method

Add meta
public addMeta ( String $property, Mixed $content, String $position ) : Opengraph
$property String
$content Mixed
$position String
return Opengraph
    public function addMeta($property, $content, $position)
    {
        $content = $this->_normalizeContent($property, $content);
        switch ($property) {
            case self::OG_TITLE:
            case self::OG_TYPE:
            case self::OG_DESCRIPTION:
            case self::OG_LOCALE:
            case self::OG_SITE_NAME:
            case self::OG_URL:
                if ($this->hasMeta($property)) {
                    $this->removeMeta($property);
                    //$this->getMeta($property)->setContent($content);
                }
                break;
        }
        if ($position == self::APPEND) {
            static::$storage->append(new Meta($property, $content));
        } else {
            $values = static::$storage->getArrayCopy();
            array_unshift($values, new Meta($property, $content));
            static::$storage->exchangeArray($values);
            unset($values);
        }
        return $this;
    }