PHP Class Artesaos\SEOTools\TwitterCards

Inheritance: implements Artesaos\SEOTools\Contracts\TwitterCards
显示文件 Open project: artesaos/seotools Class Usage Examples

Protected Properties

Property Type Description
$html array
$images array
$prefix string
$values array

Public Methods

Method Description
__construct ( array $defaults = [] )
addImage ( string | array $image ) : Artesaos\SEOTools\Contracts\TwitterCards
addValue ( string $key, string | array $value ) : Artesaos\SEOTools\Contracts\TwitterCards
generate ( boolean $minify = false ) : string
setDescription ( string $description ) : Artesaos\SEOTools\Contracts\TwitterCards
setImage ( $image ) : Artesaos\SEOTools\Contracts\TwitterCards
setImages ( string | array $images ) : Artesaos\SEOTools\Contracts\TwitterCards
setSite ( string $site ) : Artesaos\SEOTools\Contracts\TwitterCards
setTitle ( string $title ) : Artesaos\SEOTools\Contracts\TwitterCards
setType ( string $type ) : Artesaos\SEOTools\Contracts\TwitterCards
setUrl ( string $url ) : Artesaos\SEOTools\Contracts\TwitterCards

Protected Methods

Method Description
eachValue ( array $values, null | string $prefix = null ) Make tags.

Private Methods

Method Description
makeTag ( string $key, $value ) : string

Method Details

__construct() public method

public __construct ( array $defaults = [] )
$defaults array

addImage() public method

Deprecation: use setImage($image) instead
public addImage ( string | array $image ) : Artesaos\SEOTools\Contracts\TwitterCards
$image string | array
return Artesaos\SEOTools\Contracts\TwitterCards

addValue() public method

public addValue ( string $key, string | array $value ) : Artesaos\SEOTools\Contracts\TwitterCards
$key string
$value string | array
return Artesaos\SEOTools\Contracts\TwitterCards

eachValue() protected method

Make tags.
protected eachValue ( array $values, null | string $prefix = null )
$values array
$prefix null | string

generate() public method

public generate ( boolean $minify = false ) : string
$minify boolean
return string

setDescription() public method

public setDescription ( string $description ) : Artesaos\SEOTools\Contracts\TwitterCards
$description string
return Artesaos\SEOTools\Contracts\TwitterCards

setImage() public method

public setImage ( $image ) : Artesaos\SEOTools\Contracts\TwitterCards
$image
return Artesaos\SEOTools\Contracts\TwitterCards

setImages() public method

Deprecation: use setImage($image) instead
public setImages ( string | array $images ) : Artesaos\SEOTools\Contracts\TwitterCards
$images string | array
return Artesaos\SEOTools\Contracts\TwitterCards

setSite() public method

public setSite ( string $site ) : Artesaos\SEOTools\Contracts\TwitterCards
$site string
return Artesaos\SEOTools\Contracts\TwitterCards

setTitle() public method

public setTitle ( string $title ) : Artesaos\SEOTools\Contracts\TwitterCards
$title string
return Artesaos\SEOTools\Contracts\TwitterCards

setType() public method

public setType ( string $type ) : Artesaos\SEOTools\Contracts\TwitterCards
$type string
return Artesaos\SEOTools\Contracts\TwitterCards

setUrl() public method

public setUrl ( string $url ) : Artesaos\SEOTools\Contracts\TwitterCards
$url string
return Artesaos\SEOTools\Contracts\TwitterCards

Property Details

$html protected_oe property

protected array $html
return array

$images protected_oe property

protected array $images
return array

$prefix protected_oe property

protected string $prefix
return string

$values protected_oe property

protected array $values
return array