[PEPr] Comment on Yawp::Yawp2
| From: | Paul Jones | Date: | Mon, 11 Oct 2004 14:49:45 +0000 |
| Subject: | [PEPr] Comment on Yawp::Yawp2 | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-33776@lists.php.net to get a copy of this message | ||
Paul Jones (http://pear.php.net/user/pmjones) has commented on the proposal for Yawp::Yawp2.
Comment:
The Yawp 1.x order of events is at the following URL (text, not a nice
diagram, but it should suffice.)
http://phpyawp.com/yawiki/index.php?page=YawpStart#toc1
Yawp2 is slightly different. Here's an outline of what happes when you
call Yawp2::start() --
# Sets error reporting to E_ALL so that all warnings and notices are
displayed for the first part of startup; this will be reset later on
# Looks for a Yawp.conf.php configuration file in the server's document
root ($_SERVER['DOCUMENT_ROOT']) or the specified runtime location, reads
it in (or the file it points to), and stores its contents as text in the
Yawp class $_confText property; does not parse it yet.
# Pre-reads the config text to find the [Yawp_Plugin] group and loads the
files it refers to; this is so that constants from those files can later
be substituted into the config text.
# Pre-reads the config text to find the [CONSTANTS] group and defines
constants from it.
* If no DOCUMENT_ROOT constant is defined in the config file, Yawp
defines it as $_SERVER['DOCUMENT_ROOT'] with a trailing slash '/'
* If no HREF_BASE constant is defined in the config file, Yawp defines it
as '/'
* If no HTTP_HOST constant is defined in the config file, Yawp defines it
as $_SERVER['HTTP_HOST']
# Fully parses the conf text into an array using custom PEAR
Config_Container_YawpConf; stores the results as Yawp property $conf.
# Resets error reporting to the level defined in the config file
# Sets session cookie parameters as defined in the config file, then
starts a PHP session via [[php session_start]]. The session defaults
are...
* Lifetime is zero (i.e., the session lives until the browser is closed)
* Path is HREF_BASE
* Domain is HTTP_HOST
* Secure is boolean false
# Instantiates plugins named in [Yawp_Plugin] objects and executes their
start() methods, in order.
# Executes any scripts named as 'start' directives from the [Yawp] group.
Proposal information:
http://pear.php.net/pepr/pepr-proposal-show.php?id=37
--
Sent by PEPr, the automatic proposal system at http://pear.php.net