[PEPr] Comment on System::Daemon
| From: | Joe Stump | Date: | Mon, 28 Apr 2008 17:38:17 +0000 |
| Subject: | [PEPr] Comment on System::Daemon | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-49924@lists.php.net to get a copy of this message | ||
Joe Stump (http://pear.php.net/user/jstump) has commented on the proposal for System::Daemon.
Comment:
1.) I'd like to see the daemon's logging functionality accept an instance
of PEAR's Log package optionally.
2.) Why not just require System_Daemon_Exception rather than check for
it's existence and then throw a regular exception?
3.) If you don't use PEAR's Log (which would be a bummer) then I'd add
class constants for the log levels.
4.) I'm unsure what PEAR's stance on autoload() functions is at this
point. Also, if you use that you'll need to add spl to your list of
dependencies.
5.) I don't think trigger_error() is acceptable error handling for PEAR
packages at this point. I'd change all of those to throw
System_Daemon_Exception.
6.) I'd change a lot of those ini_set() to be options that can be defined
somehow. Also, I'd check to make sure we aren't in safe mode before doing
such things.
7.) I'd like to see a way where I could pass my own custom handlers to the
various sig states.
I was thinking of writing something similar to this for Digg recently so
this is a package I'd like to see in PEAR. That being said, I'd like to see
a package where I can extend the core daemon script to make my class into a
daemon, overload signal functions, etc.
Proposal information:
http://pear.php.net/pepr/pepr-proposal-show.php?id=553
--
Sent by PEPr, the automatic proposal system at http://pear.php.net