Artesaos\SEOTools\SEOMeta::getDescription PHP Method

getDescription() public method

Get the Meta description.
public getDescription ( ) : string | null
return string | null
    public function getDescription()
    {
        if (false === $this->description) {
            return;
        }
        return $this->description ?: $this->config->get('defaults.description', null);
    }

Usage Example

Beispiel #1
0
 public function test_set_description()
 {
     $description = 'Kamehamehaaaaaaaa';
     $fullHeader = "<title>It's Over 9000!</title>";
     $fullHeader .= "<meta name=\"description\" content=\"" . $description . '">';
     $this->seoMeta->setDescription($description);
     $this->assertEquals($description, $this->seoMeta->getDescription());
     $this->setRightAssertion($fullHeader);
     $this->seoMeta->setDescription(false);
     $this->assertNull($this->seoMeta->getDescription());
 }