NAME
Egg::Engine - Base class for Egg::Engin::*.
DESCRIPTION
This module is a base class for the engine.
Anything cannot be done in the unit.
METHODS
prepare_component
Prior of each component is prepared.
The following thing is concretely done.
1 ... Call of $e->request->prepare
2 ... prepare of effective each MODEL is called.
3 ... prepare of effective each VIEW is called.
4 ... prepare of each plugin is called.
5 ... Generation of dispatch object.
This method will be called from Egg::Engine::*.
run
It processes it to the WEB request.
The following things are concretely done.
1 ... The project object is generated.
2 ... start_engine of Egg::Engine::* is called.
3 ... response->result is returned and processing is completed.
Processing moves as follows when the error occurs.
1 ... Acquisition of error message
2 ... finalize_error is called.
3 ... The log is output.
4 ... Making of error screen.
5 ... response->result is returned and processing is completed.
finished ([RESPONSE_CODE])
The end of processing is told.
As a result, some processing is canceled.
Please give the argument the HTTP response code.
* The response code is set in response->status.
* 0 Resets response->status when giving it.
$e->finished(404); ## NOT_FOUND
* It is good to use Egg::Const if the response code is not understood easily.
use Egg::Const;
$e->finished( NOT_FOUND );
disp_error ([ERROR_MESSAGE])
The error screen is made.
debug_out ([MESSAGE])
The message is output to STDERR.
When debug mode is turning off, nothing is done.
output_content
response->The data output to body is output to the client.
* If finished is true, it has already canceled.
* If redirect is true, processing is divided. The content here might change in the future. However, I will have interchangeability.
log
The log object is returned.
error ([ERROR_MESSAGE])
The error message is accepted.
The error defined to omit messaging is returned by the ARRAY reference.
0 returns in case of undefined.
encode_entities ([HTML_TEXT], [ARGS])
It escapes in the HTML tag.
* HTML::Entities is used.
Ailias is 'escape_html' and 'eHTML'.
decode_entities ([PLAIN_TEXT], [ARGS])
The HTML tag where it is escaped is restored.
* HTML::Entities is used.
Ailias is 'unescape_html' and 'ueHTML'.
encode_entities_numeric ([HTML_TEXT])
The figure is made an escape object.
* HTML::Entities is used.
uri_escape
URI is encoded.
Ailias is 'escape_uri' and 'eURI'.
* URI::Escape is used.
uri_unescape
The URI decipherment is done.
Ailias is 'unescape_uri' and 'ueURI'.
* URI::Escape is used.
uri_escape_utf8
Unicode also encodes URI to the object.
* URI::Escape is used.
SEE ALSO
URI::Escape, HTML::Entities, Egg::Engine::V1, Egg::Exception Egg::Release,
AUTHOR
Masatoshi Mizuno, <mizuno@bomcity.com>
COPYRIGHT AND LICENSE
Copyright (C) 2007 Bee Flag, Corp. <http://egg.bomcity.com/>, All Rights Reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.