PHP 클래스 BcSite

파일 보기 프로젝트 열기: baserproject/basercms 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$alias string エイリアス
$autoLink boolean 自動リンク
$autoRedirect boolean 自動リダイレクト
$device string デバイス
$domainType
$enabled boolean 利用可否
$id integer サイトID
$lang string 言語
$mainSiteId integer メインサイトID
$name string 名前
$sameMainUrl boolean 同一URL
$theme
$useSubDomain

보호된 프로퍼티들

프로퍼티 타입 설명
$_sites null サブサイトリスト

공개 메소드들

메소드 설명
__construct ( string $name, array $config ) コンストラクタ
existsUrl ( CakeRequest $request ) : boolean URLが存在するか確認
findAll ( ) : BcSite[] 関連するサブサイトを全て取得する
findByAlias ( $alias ) : BcSite | null エイリアスからサイトを検索する
findById ( $id )
findByUrl ( $url )
findCurrent ( boolean $direct = true ) : BcSite | null URLからサブサイトを取得する
findCurrentMain ( ) : BcSite | null 現在のサイトに関連するメインサイトを取得
findCurrentSub ( boolean $sameMainUrl = false, BcAgent $agent = null, $lang = null ) : BcSite | null 現在のサイトとユーザーエージェントに関連するサブサイトを取得する
flash ( )
getMain ( ) : BcSite | null メインサイトを取得
getPureUrl ( string $url ) : mixed | string エイリアスを除外したURLを取得
isEnabled ( ) : boolean 設定が有効かどうかを判定
makeUrl ( CakeRequest $request ) : string エイリアスを反映したURLを生成 同一URL設定のみ利用可
shouldRedirects ( CakeRequest $request ) : boolean 与えられたリクエストに対して自動リダイレクトすべきかどうかを返す

보호된 메소드들

메소드 설명
_setConfig ( array $config ) : void 設定

메소드 상세

__construct() 공개 메소드

コンストラクタ
public __construct ( string $name, array $config )
$name string 名前
$config array 設定の配列

_setConfig() 보호된 메소드

設定
protected _setConfig ( array $config ) : void
$config array 設定の配列
리턴 void

existsUrl() 공개 메소드

URLが存在するか確認
public existsUrl ( CakeRequest $request ) : boolean
$request CakeRequest
리턴 boolean

findAll() 공개 정적인 메소드

関連するサブサイトを全て取得する
public static findAll ( ) : BcSite[]
리턴 BcSite[]

findByAlias() 공개 정적인 메소드

エイリアスからサイトを検索する
public static findByAlias ( $alias ) : BcSite | null
$alias
리턴 BcSite | null

findById() 공개 정적인 메소드

public static findById ( $id )

findByUrl() 공개 정적인 메소드

public static findByUrl ( $url )

findCurrent() 공개 정적인 메소드

URLからサブサイトを取得する
public static findCurrent ( boolean $direct = true ) : BcSite | null
$direct boolean
리턴 BcSite | null

findCurrentMain() 공개 정적인 메소드

現在のサイトに関連するメインサイトを取得
public static findCurrentMain ( ) : BcSite | null
리턴 BcSite | null

findCurrentSub() 공개 정적인 메소드

現在のサイトとユーザーエージェントに関連するサブサイトを取得する
public static findCurrentSub ( boolean $sameMainUrl = false, BcAgent $agent = null, $lang = null ) : BcSite | null
$sameMainUrl boolean
$agent BcAgent
리턴 BcSite | null

flash() 공개 정적인 메소드

public static flash ( )

getMain() 공개 메소드

メインサイトを取得
public getMain ( ) : BcSite | null
리턴 BcSite | null

getPureUrl() 공개 메소드

エイリアスを除外したURLを取得
public getPureUrl ( string $url ) : mixed | string
$url string
리턴 mixed | string

isEnabled() 공개 메소드

設定が有効かどうかを判定
public isEnabled ( ) : boolean
리턴 boolean

makeUrl() 공개 메소드

エイリアスを反映したURLを生成 同一URL設定のみ利用可
public makeUrl ( CakeRequest $request ) : string
$request CakeRequest リクエスト
리턴 string

shouldRedirects() 공개 메소드

与えられたリクエストに対して自動リダイレクトすべきかどうかを返す
public shouldRedirects ( CakeRequest $request ) : boolean
$request CakeRequest リクエスト
리턴 boolean

프로퍼티 상세

$_sites 보호되어 있는 정적으로 프로퍼티

サブサイトリスト
protected static null $_sites
리턴 null

$alias 공개적으로 프로퍼티

エイリアス
public string $alias
리턴 string

$autoRedirect 공개적으로 프로퍼티

自動リダイレクト
public bool $autoRedirect
리턴 boolean

$device 공개적으로 프로퍼티

デバイス
public string $device
리턴 string

$domainType 공개적으로 프로퍼티

public $domainType

$enabled 공개적으로 프로퍼티

利用可否
public bool $enabled
리턴 boolean

$id 공개적으로 프로퍼티

サイトID
public int $id
리턴 integer

$lang 공개적으로 프로퍼티

言語
public string $lang
리턴 string

$mainSiteId 공개적으로 프로퍼티

メインサイトID
public int $mainSiteId
리턴 integer

$name 공개적으로 프로퍼티

名前
public string $name
리턴 string

$sameMainUrl 공개적으로 프로퍼티

同一URL
public bool $sameMainUrl
리턴 boolean

$theme 공개적으로 프로퍼티

public $theme

$useSubDomain 공개적으로 프로퍼티

public $useSubDomain