Application
class Application extends ApplicationTrait
Properties
static protected | $instance | ||
protected | $initialized | ||
protected | $initializedPlugin | ||
protected | $testMode |
Methods
Creates and returns a form builder instance
Adds a log record.
Encodes the raw password.
Checks if the attributes are granted against the current authentication token and optionally supplied object.
Sends an email.
Translates the given message.
Translates the given choice message by choosing a translation according to a number.
Renders a view and returns a Response.
Generates a path from the given parameters.
Generates an absolute URL from the given parameters.
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
PHPUnit を実行中かどうかを設定する.
PHPUnit を実行中かどうか.
データベースの接続を確認 成功 : trueを返却 失敗 : \Doctrine\DBAL\DBALExceptionエラーが発生( 接続に失敗した場合 )、エラー画面を表示しdie() 備考 : app['debug']がtrueの際は処理を行わない
Config ファイルをパースし、連想配列を返します.
セッションが開始されているかどうか.
Http Cache対応
Details
in ApplicationTrait at line 21
addSuccess($message, $namespace = 'front')
Application Shortcut Methods
in ApplicationTrait at line 26
addError($message, $namespace = 'front')
in ApplicationTrait at line 31
addDanger($message, $namespace = 'front')
in ApplicationTrait at line 36
addWarning($message, $namespace = 'front')
in ApplicationTrait at line 41
addInfo($message, $namespace = 'front')
in ApplicationTrait at line 46
addRequestError($message, $namespace = 'front')
in ApplicationTrait at line 51
clearMessage()
in ApplicationTrait at line 56
deleteMessage()
in ApplicationTrait at line 62
setLoginTargetPath($targetPath, $namespace = null)
in ApplicationTrait at line 71
isAdminRequest()
in ApplicationTrait at line 76
isFrontRequest()
in ApplicationTrait at line 101
FormBuilder
form(mixed $data = null, array $options = array())
Creates and returns a form builder instance
in ApplicationTrait at line 116
bool
log(string $message, array $context = array(), int $level = Logger::INFO)
Adds a log record.
in ApplicationTrait at line 130
mixed
user()
Gets a user from the Security context.
in ApplicationTrait at line 145
string
encodePassword(UserInterface $user, string $password)
Encodes the raw password.
in ApplicationTrait at line 160
bool
isGranted(mixed $attributes, mixed $object = null)
Checks if the attributes are granted against the current authentication token and optionally supplied object.
in ApplicationTrait at line 174
int
mail(Swift_Message $message, array $failedRecipients = null)
Sends an email.
in ApplicationTrait at line 190
string
trans(string $id, array $parameters = array(), string $domain = 'messages', string $locale = null)
Translates the given message.
in ApplicationTrait at line 206
string
transChoice(string $id, int $number, array $parameters = array(), string $domain = 'messages', string $locale = null)
Translates the given choice message by choosing a translation according to a number.
in ApplicationTrait at line 223
Response
render(string $view, array $parameters = array(), Response $response = null)
Renders a view and returns a Response.
To stream a view, pass an instance of StreamedResponse as a third argument.
in ApplicationTrait at line 271
string
renderView(string $view, array $parameters = array())
Renders a view.
in ApplicationTrait at line 285
string
path(string $route, mixed $parameters = array())
Generates a path from the given parameters.
in ApplicationTrait at line 298
string
url(string $route, mixed $parameters = array())
Generates an absolute URL from the given parameters.
at line 48
static
getInstance(array $values = array())
at line 57
static
clearInstance()
at line 62
final
__clone()
at line 67
__construct(array $values = array())
at line 82
initConfig()
at line 103
initLogger()
at line 111
initialize()
at line 195
initLocale()
at line 229
initSession()
at line 254
initRendering()
at line 374
initMailer()
at line 404
initDoctrine()
at line 501
initSecurity()
at line 602
initializePlugin()
at line 617
initPluginEventDispatcher()
at line 821
loadPlugin()
at line 937
setTestMode(boolean $testMode)
PHPUnit を実行中かどうかを設定する.
at line 947
boolean
isTestMode()
PHPUnit を実行中かどうか.
at line 962
protected boolean
checkDatabaseConnection()
データベースの接続を確認 成功 : trueを返却 失敗 : \Doctrine\DBAL\DBALExceptionエラーが発生( 接続に失敗した場合 )、エラー画面を表示しdie() 備考 : app['debug']がtrueの際は処理を行わない
at line 1000
Application
parseConfig(string $config_name, array $configAll, boolean $wrap_key = false, string $ymlPath = null, string $distPath = null)
Config ファイルをパースし、連想配列を返します.
$configname.yml ファイルをパースし、連想配列を返します. $configname.php が存在する場合は、 PHP ファイルに記述された連想配列を使用します。
at line 1048
protected boolean
isSessionStarted()
セッションが開始されているかどうか.
at line 1064
protected
initCacheRequest()
Http Cache対応