PHP 클래스 BcAppController

상속: extends Controller
파일 보기 프로젝트 열기: baserproject/basercms

공개 프로퍼티들

프로퍼티 타입 설명
$adminTheme string 管理画面テーマ
$components array コンポーネント
$content array コンテンツデータ
$contentsTitle string コンテンツタイトル
$crumbs array パンくずナビ
$help string ヘルプ
$helpers TODO 見直し
$layout string レイアウト
$pageTitle string ページタイトル
$preview boolean プレビューフラグ
$search string 検索ボックス
$site array サイトデータ
$siteConfigs array サイトコンフィグデータ
$siteDescription string ページ説明文
$subDir string サブディレクトリ
$subMenuElements string サブメニューエレメント
$uses mixed モデル
$viewClass string view

공개 메소드들

메소드 설명
__construct ( CakeRequest $request = null, CakeResponse $response = null ) コンストラクタ
_blackHoleCallback ( string $err ) : void Securityコンポーネントのブラックホールからのコールバック
admin_ajax_batch ( ) : void 一括処理
admin_ajax_get_token ( ) : string admin用Token取得アクション
admin_ajax_save_favorite_box ( mixed $open = '' ) : void よく使う項目の表示状態を保存する
admin_ajax_save_search_box ( string $key, mixed $open = '' ) : void 検索ボックスの表示状態を保存する
beforeFilter ( ) : void beforeFilter
beforeRender ( ) : void beforeRender
dispatchEvent ( string $name, array $params = [], array $options = [] ) : mixed イベントを発火
isAuthorized ( array $user ) : boolean 認証完了後処理
redirect ( mixed $url, integer $status = null, boolean $exit = true ) : mixed Redirects to given $url, after turning off $this->autoRender.
referer ( string $default = null, boolean $local = false ) : string Returns the referring URL for this request.
requestAction ( mixed $url, array $extra = [] ) : mixed Calls a controller's method from any location.
setAction ( string $action ) : mixed Internally redirects one action to another. Examples:

보호된 메소드들

메소드 설명
_adminSslMethods ( string $var ) : boolean 管理画面用のメソッドを取得(コールバックメソッド)
_autoConvertEncodingByArray ( array $data, string $outenc ) : array 配列の文字コードを変換する
_checkReferer ( ) : boolean リファラチェックを行う
_checkSubmitToken ( ) リクエストメソッドとトークンをチェックする
_loadViewConditions ( array $filterModels = [], array | string $options = [] ) : void 画面の情報をセッションから読み込む
_saveViewConditions ( array $filterModels = [], array $options = [] ) : void 画面の情報をセッションに保存する
_sslFail ( string $err ) : void SSLエラー処理
ajaxError ( integer $errorNo = 500, mixed $message = '' ) : void Ajax用のエラーを出力する
convertBetweenCondition ( string $fieldName, mixed $value ) : array BETWEEN 条件を生成
convertSelectTextCondition ( string $fieldName, mixed $values, array $options = [] ) : string Select Text 用の条件を生成する
generatePassword ( integer $len = 8 ) : string ランダムなパスワード文字列を生成する
getBaserVersion ( string $plugin = '' ) : string baserCMSのバージョンを取得する
getCakeVersion ( ) : string CakePHPのバージョンを取得する
getSiteVersion ( string $plugin = '' ) : string DBのバージョンを取得する
getThemeVersion ( string $theme ) : string テーマのバージョン番号を取得する
getToken ( ) : string Token の key を取得 CSRF対策のためにフォームのトークンを入手するためのもの adminと表画面でアクションを分離するために、取得部分を共通化
getUserModel ( ) : mixed リクエストされた画面に対しての認証用ユーザーモデルを取得する
notFound ( ) : void NOT FOUNDページを出力する
sendMail ( string $to, string $title = '', mixed $body = '', array $options = [] ) : boolean メールを送信する
setMessage ( string $message, boolean $alert = false, boolean $saveDblog = false, boolean $setFlash = true ) : void メッセージをビューにセットする
setTheme ( ) : void テーマをセットする
setThemeHelpers ( ) : void テーマ用のヘルパーをセットする 管理画面では読み込まない
setViewConditions ( array $filterModels = [], array $options = [] ) : void 画面の情報をセットする

비공개 메소드들

메소드 설명
__convertEncodingHttpInput ( ) : void http経由で送信されたデータを変換する とりあえず、UTF-8で固定
__loadDataToView ( ) : void View用のデータを読み込む。 beforeRenderで呼び出される
__updateFirstAccess ( ) : void 初回アクセスメッセージ用のフラグを更新する

메소드 상세

__construct() 공개 메소드

コンストラクタ
public __construct ( CakeRequest $request = null, CakeResponse $response = null )
$request CakeRequest リクエストオブジェクト
$response CakeResponse レスポンスオブジェクト

_adminSslMethods() 보호된 메소드

管理画面用のメソッドを取得(コールバックメソッド)
protected _adminSslMethods ( string $var ) : boolean
$var string
리턴 boolean

_autoConvertEncodingByArray() 보호된 메소드

配列の文字コードを変換する
protected _autoConvertEncodingByArray ( array $data, string $outenc ) : array
$data array 変換前データ
$outenc string 変換後の文字コード
리턴 array 変換後データ

_blackHoleCallback() 공개 메소드

フォーム改ざん対策・CSRF対策・SSL制限・HTTPメソッド制限などへの違反が原因で Securityコンポーネントに"ブラックホールされた"場合の動作を指定する
public _blackHoleCallback ( string $err ) : void
$err string エラーの種類
리턴 void

_checkReferer() 보호된 메소드

リファラチェックを行う
protected _checkReferer ( ) : boolean
리턴 boolean

_checkSubmitToken() 보호된 메소드

- GETでのアクセスの場合 not found - トークンが送信されていない場合 not found
protected _checkSubmitToken ( )

_loadViewConditions() 보호된 메소드

画面の情報をセッションから読み込む
protected _loadViewConditions ( array $filterModels = [], array | string $options = [] ) : void
$filterModels array
$options array | string オプション
리턴 void

_saveViewConditions() 보호된 메소드

画面の情報をセッションに保存する
protected _saveViewConditions ( array $filterModels = [], array $options = [] ) : void
$filterModels array
$options array オプション
리턴 void

_sslFail() 보호된 메소드

SSL通信が必要なURLの際にSSLでない場合、 SSLのURLにリダイレクトさせる
protected _sslFail ( string $err ) : void
$err string エラーの種類
리턴 void

admin_ajax_batch() 공개 메소드

一括処理としてコントローラーの次のメソッドを呼び出す バッチ処理名は、バッチ処理指定用のコンボボックスで定義する _batch{バッチ処理名} 処理結果として成功の場合は、バッチ処理名を出力する
public admin_ajax_batch ( ) : void
리턴 void

admin_ajax_get_token() 공개 메소드

admin用Token取得アクション
public admin_ajax_get_token ( ) : string
리턴 string

admin_ajax_save_favorite_box() 공개 메소드

よく使う項目の表示状態を保存する
public admin_ajax_save_favorite_box ( mixed $open = '' ) : void
$open mixed 1 Or ''
리턴 void

ajaxError() 보호된 메소드

Ajax用のエラーを出力する
protected ajaxError ( integer $errorNo = 500, mixed $message = '' ) : void
$errorNo integer エラーのステータスコード
$message mixed エラーメッセージ
리턴 void

beforeFilter() 공개 메소드

beforeFilter
public beforeFilter ( ) : void
리턴 void

beforeRender() 공개 메소드

beforeRender
public beforeRender ( ) : void
리턴 void

convertBetweenCondition() 보호된 메소드

BETWEEN 条件を生成
protected convertBetweenCondition ( string $fieldName, mixed $value ) : array
$fieldName string フィールド名
$value mixed
리턴 array

convertSelectTextCondition() 보호된 메소드

Select Text 用の条件を生成する
protected convertSelectTextCondition ( string $fieldName, mixed $values, array $options = [] ) : string
$fieldName string フィールド名
$values mixed
$options array オプション
리턴 string

dispatchEvent() 공개 메소드

イベントを発火
public dispatchEvent ( string $name, array $params = [], array $options = [] ) : mixed
$name string イベント名
$params array パラメータ
$options array オプション
리턴 mixed

generatePassword() 보호된 메소드

ランダムなパスワード文字列を生成する
protected generatePassword ( integer $len = 8 ) : string
$len integer 文字列の長さ
리턴 string パスワード

getBaserVersion() 보호된 메소드

baserCMSのバージョンを取得する
protected getBaserVersion ( string $plugin = '' ) : string
$plugin string プラグイン名
리턴 string Baserバージョン

getCakeVersion() 보호된 메소드

CakePHPのバージョンを取得する
protected getCakeVersion ( ) : string
리턴 string Baserバージョン

getSiteVersion() 보호된 메소드

DBのバージョンを取得する
protected getSiteVersion ( string $plugin = '' ) : string
$plugin string プラグイン名
리턴 string

getThemeVersion() 보호된 메소드

テーマのバージョン番号を取得する
protected getThemeVersion ( string $theme ) : string
$theme string テーマ名
리턴 string

getToken() 보호된 메소드

Token の key を取得 CSRF対策のためにフォームのトークンを入手するためのもの adminと表画面でアクションを分離するために、取得部分を共通化
protected getToken ( ) : string
리턴 string

getUserModel() 보호된 메소드

リクエストされた画面に対しての認証用ユーザーモデルを取得する
protected getUserModel ( ) : mixed
리턴 mixed string Or false

isAuthorized() 공개 메소드

認証完了後処理
public isAuthorized ( array $user ) : boolean
$user array 認証されたユーザー情報
리턴 boolean

notFound() 보호된 메소드

NOT FOUNDページを出力する
protected notFound ( ) : void
리턴 void

redirect() 공개 메소드

Script execution is halted after the redirect.
public redirect ( mixed $url, integer $status = null, boolean $exit = true ) : mixed
$url mixed A string or array-based URL pointing to another location within the app, or an absolute URL
$status integer Optional HTTP status code (eg: 404)
$exit boolean If true, exit() will be called after the redirect
리턴 mixed void if $exit = false. Terminates script if $exit = true

referer() 공개 메소드

Returns the referring URL for this request.
public referer ( string $default = null, boolean $local = false ) : string
$default string Default URL to use if HTTP_REFERER cannot be read from headers
$local boolean If true, restrict referring URLs to local server
리턴 string Referring URL

requestAction() 공개 메소드

Calls a controller's method from any location.
public requestAction ( mixed $url, array $extra = [] ) : mixed
$url mixed String or array-based url.
$extra array if array includes the key "return" it sets the AutoRender to true.
리턴 mixed Boolean true or false on success/failure, or contents of rendered action if 'return' is set in $extra.

sendMail() 보호된 메소드

メールを送信する
protected sendMail ( string $to, string $title = '', mixed $body = '', array $options = [] ) : boolean
$to string 送信先アドレス
$title string タイトル
$body mixed 本文
$options array オプション
리턴 boolean 送信結果

setAction() 공개 메소드

setAction('another_action'); setAction('action_with_parameters', $parameter1);
public setAction ( string $action ) : mixed
$action string The new action to be redirected to
리턴 mixed Returns the return value of the called action

setMessage() 보호된 메소드

メッセージをビューにセットする
protected setMessage ( string $message, boolean $alert = false, boolean $saveDblog = false, boolean $setFlash = true ) : void
$message string メッセージ
$alert boolean 警告かどうか
$saveDblog boolean Dblogに保存するか
$setFlash boolean flash message に保存するか
리턴 void

setTheme() 보호된 메소드

テーマをセットする
protected setTheme ( ) : void
리턴 void

setThemeHelpers() 보호된 메소드

テーマ用のヘルパーをセットする 管理画面では読み込まない
protected setThemeHelpers ( ) : void
리턴 void

setViewConditions() 보호된 메소드

画面の情報をセットする
protected setViewConditions ( array $filterModels = [], array $options = [] ) : void
$filterModels array
$options array オプション
리턴 void

프로퍼티 상세

$adminTheme 공개적으로 프로퍼티

管理画面テーマ
public string $adminTheme
리턴 string

$components 공개적으로 프로퍼티

コンポーネント
public array $components
리턴 array

$content 공개적으로 프로퍼티

コンテンツデータ
public array $content
리턴 array

$contentsTitle 공개적으로 프로퍼티

コンテンツタイトル
public string $contentsTitle
리턴 string

$crumbs 공개적으로 프로퍼티

パンくずナビ
public array $crumbs
리턴 array

$help 공개적으로 프로퍼티

ヘルプ
public string $help
리턴 string

$helpers 공개적으로 프로퍼티

TODO 見直し
public $helpers

$layout 공개적으로 프로퍼티

レイアウト
public string $layout
리턴 string

$pageTitle 공개적으로 프로퍼티

ページタイトル
public string $pageTitle
리턴 string

$preview 공개적으로 프로퍼티

プレビューフラグ
public bool $preview
리턴 boolean

$site 공개적으로 프로퍼티

サイトデータ
public array $site
리턴 array

$siteConfigs 공개적으로 프로퍼티

サイトコンフィグデータ
public array $siteConfigs
리턴 array

$siteDescription 공개적으로 프로퍼티

ページ説明文
public string $siteDescription
리턴 string

$subDir 공개적으로 프로퍼티

サブディレクトリ
public string $subDir
리턴 string

$subMenuElements 공개적으로 프로퍼티

サブメニューエレメント
public string $subMenuElements
리턴 string

$uses 공개적으로 프로퍼티

モデル
public mixed $uses
리턴 mixed

$viewClass 공개적으로 프로퍼티

view
public string $viewClass
리턴 string