PHP 클래스 Eccube\Application\ApplicationTrait

상속: extends Silex\Application
파일 보기 프로젝트 열기: ec-cube/ec-cube 1 사용 예제들

공개 메소드들

메소드 설명
addDanger ( $message, $namespace = 'front' )
addError ( $message, $namespace = 'front' )
addInfo ( $message, $namespace = 'front' )
addRequestError ( $message, $namespace = 'front' )
addSuccess ( $message, $namespace = 'front' ) Application Shortcut Methods
addWarning ( $message, $namespace = 'front' )
clearMessage ( )
deleteMessage ( )
encodePassword ( Symfony\Component\Security\Core\User\UserInterface $user, string $password ) : string Encodes the raw password.
form ( mixed $data = null, array $options = [] ) : FormBuilder Creates and returns a form builder instance
isAdminRequest ( )
isFrontRequest ( )
isGranted ( mixed $attributes, mixed $object = null ) : boolean Checks if the attributes are granted against the current authentication token and optionally supplied object.
log ( string $message, array $context = [], integer $level = Logger::INFO ) : boolean Adds a log record.
mail ( Swift_Message $message, array &$failedRecipients = null ) : integer Sends an email.
path ( string $route, mixed $parameters = [] ) : string Generates a path from the given parameters.
render ( string $view, array $parameters = [], Response $response = null ) : Response Renders a view and returns a Response.
renderView ( string $view, array $parameters = [] ) : string Renders a view.
setLoginTargetPath ( $targetPath, $namespace = null )
trans ( string $id, array $parameters = [], string $domain = 'messages', string $locale = null ) : string Translates the given message.
transChoice ( string $id, integer $number, array $parameters = [], string $domain = 'messages', string $locale = null ) : string Translates the given choice message by choosing a translation according to a number.
url ( string $route, mixed $parameters = [] ) : string Generates an absolute URL from the given parameters.
user ( ) : mixed Gets a user from the Security context.

메소드 상세

addDanger() 공개 메소드

public addDanger ( $message, $namespace = 'front' )

addError() 공개 메소드

public addError ( $message, $namespace = 'front' )

addInfo() 공개 메소드

public addInfo ( $message, $namespace = 'front' )

addRequestError() 공개 메소드

public addRequestError ( $message, $namespace = 'front' )

addSuccess() 공개 메소드

Application Shortcut Methods
public addSuccess ( $message, $namespace = 'front' )

addWarning() 공개 메소드

public addWarning ( $message, $namespace = 'front' )

clearMessage() 공개 메소드

public clearMessage ( )

deleteMessage() 공개 메소드

public deleteMessage ( )

encodePassword() 공개 메소드

Encodes the raw password.
public encodePassword ( Symfony\Component\Security\Core\User\UserInterface $user, string $password ) : string
$user Symfony\Component\Security\Core\User\UserInterface A UserInterface instance
$password string The password to encode
리턴 string The encoded password

form() 공개 메소드

Creates and returns a form builder instance
public form ( mixed $data = null, array $options = [] ) : FormBuilder
$data mixed The initial data for the form
$options array Options for the form
리턴 Symfony\Component\Form\FormBuilder

isAdminRequest() 공개 메소드

public isAdminRequest ( )

isFrontRequest() 공개 메소드

public isFrontRequest ( )

isGranted() 공개 메소드

Checks if the attributes are granted against the current authentication token and optionally supplied object.
public isGranted ( mixed $attributes, mixed $object = null ) : boolean
$attributes mixed
$object mixed
리턴 boolean

log() 공개 메소드

Adds a log record.
public log ( string $message, array $context = [], integer $level = Logger::INFO ) : boolean
$message string The log message
$context array The log context
$level integer The logging level
리턴 boolean Whether the record has been processed

mail() 공개 메소드

Sends an email.
public mail ( Swift_Message $message, array &$failedRecipients = null ) : integer
$message Swift_Message A \Swift_Message instance
$failedRecipients array An array of failures by-reference
리턴 integer The number of sent messages

path() 공개 메소드

Generates a path from the given parameters.
public path ( string $route, mixed $parameters = [] ) : string
$route string The name of the route
$parameters mixed An array of parameters
리턴 string The generated path

render() 공개 메소드

To stream a view, pass an instance of StreamedResponse as a third argument.
public render ( string $view, array $parameters = [], Response $response = null ) : Response
$view string The view name
$parameters array An array of parameters to pass to the view
$response Symfony\Component\HttpFoundation\Response A Response instance
리턴 Symfony\Component\HttpFoundation\Response A Response instance

renderView() 공개 메소드

Renders a view.
public renderView ( string $view, array $parameters = [] ) : string
$view string The view name
$parameters array An array of parameters to pass to the view
리턴 string The rendered view

setLoginTargetPath() 공개 메소드

public setLoginTargetPath ( $targetPath, $namespace = null )

trans() 공개 메소드

Translates the given message.
public trans ( string $id, array $parameters = [], string $domain = 'messages', string $locale = null ) : string
$id string The message id
$parameters array An array of parameters for the message
$domain string The domain for the message
$locale string The locale
리턴 string The translated string

transChoice() 공개 메소드

Translates the given choice message by choosing a translation according to a number.
public transChoice ( string $id, integer $number, array $parameters = [], string $domain = 'messages', string $locale = null ) : string
$id string The message id
$number integer The number to use to find the indice of the message
$parameters array An array of parameters for the message
$domain string The domain for the message
$locale string The locale
리턴 string The translated string

url() 공개 메소드

Generates an absolute URL from the given parameters.
public url ( string $route, mixed $parameters = [] ) : string
$route string The name of the route
$parameters mixed An array of parameters
리턴 string The generated URL

user() 공개 메소드

Gets a user from the Security context.
또한 보기: TokenInterface::getUser()
public user ( ) : mixed
리턴 mixed