PHP Class Xpressengine\Seo\SeoHandler

### app binding : xe.seo 로 바인딩 되어 있음 XeSEO Facade 로 접근이 가능 ### Usage SEO 를 사용하기 위해선 SeoUsable 인터페이스를 적용하고자하는 대상 객체에 구현해야 함. 예를 들어 Document 라는 객체를 SEO 에 적용 시키고자 하면 다음과 같이 코드를 작성 해야함. php class Document implements SeoUsable { ... 위와 같이 구현된 객체를 Presenter 를 통해 전달하게 되면 객체로부터 내용을 수집하여 meta tag 등 으로 노출하게 되어짐. php XePresenter::make('some.view', [$seoUsableObject, $var1, $var2, ...]); * Not execution 간혹 어떤 상황에서 html 렌더링이 이루어지더라도 SEO 처리가 되지 않길 원하는 경우 XeSEO::notExec() 를 실행하면 SEO 관련 태그들이 적용되지 않음
Author: XE Developers ([email protected])
Afficher le fichier Open project: xpressengine/xpressengine Class Usage Examples

Protected Properties

Свойство Type Description
$executable boolean Will be executed
$importers Xpressengine\Seo\Importers\AbstractImporter[] Importer instances
$isExecuted boolean Already executed
$setting Setting Setting instance
$translator Xpressengine\Translation\Translator Translator instances

Méthodes publiques

Méthode Description
__construct ( array $importers, Setting $setting, Translator $translator ) Constructor
addImporter ( AbstractImporter $importer ) : void Add Importer
getSetting ( ) : Setting Returns Setting instance
import ( array | Xpressengine\Seo\SeoUsable $items ) : void Import to html header
notExec ( ) : void Set will not executed

Méthodes protégées

Méthode Description
extract ( array $items ) : null | Xpressengine\Seo\SeoUsable Extract item of seo usable
makeTitle ( Xpressengine\Seo\SeoUsable $item = null ) : string Make title text
resolveData ( Xpressengine\Seo\SeoUsable $item = null ) : array Data resolve

Method Details

__construct() public méthode

Constructor
public __construct ( array $importers, Setting $setting, Translator $translator )
$importers array Importer instances
$setting Setting Setting instances
$translator Xpressengine\Translation\Translator Translator instances

addImporter() public méthode

Add Importer
public addImporter ( AbstractImporter $importer ) : void
$importer Xpressengine\Seo\Importers\AbstractImporter Importer instance
Résultat void

extract() protected méthode

Extract item of seo usable
protected extract ( array $items ) : null | Xpressengine\Seo\SeoUsable
$items array view 에서 사용되어지는 모든 아이템 목록
Résultat null | Xpressengine\Seo\SeoUsable

getSetting() public méthode

Returns Setting instance
public getSetting ( ) : Setting
Résultat Setting

import() public méthode

Import to html header
public import ( array | Xpressengine\Seo\SeoUsable $items ) : void
$items array | Xpressengine\Seo\SeoUsable view 에서 사용되어지는 모든 아이템 목록
Résultat void

makeTitle() protected méthode

Make title text
protected makeTitle ( Xpressengine\Seo\SeoUsable $item = null ) : string
$item Xpressengine\Seo\SeoUsable item instance
Résultat string

notExec() public méthode

Set will not executed
public notExec ( ) : void
Résultat void

resolveData() protected méthode

Data resolve
protected resolveData ( Xpressengine\Seo\SeoUsable $item = null ) : array
$item Xpressengine\Seo\SeoUsable item instance
Résultat array

Property Details

$executable protected_oe property

Will be executed
protected bool $executable
Résultat boolean

$importers protected_oe property

Importer instances
protected AbstractImporter[],Xpressengine\Seo\Importers $importers
Résultat Xpressengine\Seo\Importers\AbstractImporter[]

$isExecuted protected_oe property

Already executed
protected bool $isExecuted
Résultat boolean

$setting protected_oe property

Setting instance
protected Setting,Xpressengine\Seo $setting
Résultat Setting

$translator protected_oe property

Translator instances
protected Translator,Xpressengine\Translation $translator
Résultat Xpressengine\Translation\Translator