PHP Класс Eccube\Application\ApplicationTrait

Наследование: extends Silex\Application
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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