Artesaos\SEOTools\SEOMeta::reset PHP Method

reset() public method

Reset all data.
public reset ( ) : void
return void
    public function reset()
    {
        $this->description = null;
        $this->title_session = null;
        $this->next = null;
        $this->prev = null;
        $this->canonical = null;
        $this->metatags = [];
        $this->keywords = [];
        $this->alternateLanguages = [];
        $this->canonical = null;
    }

Usage Example

コード例 #1
0
ファイル: SEOMetaTest.php プロジェクト: artesaos/seotools
 public function test_set_reset()
 {
     $expected = "<title>It's Over 9000!</title>";
     $expected .= "<meta name=\"description\" content=\"For those who helped create the Genki Dama\">";
     $this->seoMeta->setDescription('test');
     $this->seoMeta->addKeyword('test');
     $this->seoMeta->setNext('test');
     $this->seoMeta->setPrev('test');
     $this->seoMeta->setCanonical('test');
     $this->seoMeta->addMeta('test');
     $this->seoMeta->addAlternateLanguage('test', 'test');
     $this->seoMeta->reset();
     $this->setRightAssertion($expected);
 }