多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
# Class Phalcon\\Flash\\Session # Class **Phalcon\\Flash\\Session** *extends* abstract class [*Phalcon\\Flash*](#) *implements*[*Phalcon\\FlashInterface*](#), `Phalcon\Di\InjectionAwareInterface` Temporarily stores the messages in session, then messages can be printed in the next request ### Methods public **setDI** (*unknown* $dependencyInjector) Sets the dependency injector public **getDI** () Returns the internal dependency injector protected **\_getSessionMessages** (*unknown* $remove) Returns the messages stored in session protected **\_setSessionMessages** (*unknown* $messages) Stores the messages in session public **message** (*unknown* $type, *unknown* $message) Adds a message to the session flasher public **has** (\[*unknown* $type\]) Checks whether there are messages public **getMessages** (\[*unknown* $type\], \[*unknown* $remove\]) Returns the messages in the session flasher public **output** (\[*unknown* $remove\]) Prints the messages in the session flasher public **clear** () Clear messages in the session messenger public **\_\_construct** (\[*unknown* $cssClasses\]) inherited from Phalcon\\Flash Phalcon\\Flash constructor public **setImplicitFlush** (*unknown* $implicitFlush) inherited from Phalcon\\Flash Set whether the output must be implicitly flushed to the output or returned as string public **setAutomaticHtml** (*unknown* $automaticHtml) inherited from Phalcon\\Flash Set if the output must be implicitly formatted with HTML public **setCssClasses** (*unknown* $cssClasses) inherited from Phalcon\\Flash Set an array with CSS classes to format the messages public **error** (*unknown* $message) inherited from Phalcon\\Flash Shows a HTML error message ``` <pre class="calibre14">``` <?php $flash->error('This is an error'); ``` ``` public **notice** (*unknown* $message) inherited from Phalcon\\Flash Shows a HTML notice/information message ``` <pre class="calibre14">``` <?php $flash->notice('This is an information'); ``` ``` public **success** (*unknown* $message) inherited from Phalcon\\Flash Shows a HTML success message ``` <pre class="calibre14">``` <?php $flash->success('The process was finished successfully'); ``` ``` public **warning** (*unknown* $message) inherited from Phalcon\\Flash Shows a HTML warning message ``` <pre class="calibre14">``` <?php $flash->warning('Hey, this is important'); ``` ``` public **outputMessage** (*unknown* $type, *string|array* $message) inherited from Phalcon\\Flash Outputs a message formatting it with HTML ``` <pre class="calibre14">``` <?php $flash->outputMessage('error', message); ``` ``` | - [索引](# "总目录") - [下一页](# "Abstract class Phalcon\Forms\Element") | - [上一页](# "Class Phalcon\Flash\Exception") | - [API Indice](#) »