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])
Mostra file Open project: xpressengine/xpressengine Class Usage Examples

Protected Properties

Property 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

Public Methods

Method 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

Protected Methods

Method 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 method

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 method

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

extract() protected method

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

getSetting() public method

Returns Setting instance
public getSetting ( ) : Setting
return Setting

import() public method

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

makeTitle() protected method

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

notExec() public method

Set will not executed
public notExec ( ) : void
return void

resolveData() protected method

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

Property Details

$executable protected_oe property

Will be executed
protected bool $executable
return boolean

$importers protected_oe property

Importer instances
protected AbstractImporter[],Xpressengine\Seo\Importers $importers
return Xpressengine\Seo\Importers\AbstractImporter[]

$isExecuted protected_oe property

Already executed
protected bool $isExecuted
return boolean

$setting protected_oe property

Setting instance
protected Setting,Xpressengine\Seo $setting
return Setting

$translator protected_oe property

Translator instances
protected Translator,Xpressengine\Translation $translator
return Xpressengine\Translation\Translator