php-general Digest 19 Jan 2011 15:34:27 -0000 Issue 7141

2011-01-19 Thread php-general-digest-help
php-general Digest 19 Jan 2011 15:34:27 - Issue 7141 Topics (messages 310849 through 310868): Re: switch case madness 310849 by: Chen Dong 310850 by: Joshua Kehn 310851 by: Mujtaba Arshad 310852 by: Donovan Brooke 310853 by: Joshua Kehn 310854

php-general Digest 20 Jan 2011 03:45:38 -0000 Issue 7142

2011-01-19 Thread php-general-digest-help
php-general Digest 20 Jan 2011 03:45:38 - Issue 7142 Topics (messages 310869 through 310889): Re: switch case madness 310869 by: Daniel Brown 310870 by: Joshua Kehn 310872 by: David Hutto 310881 by: Micky Hulse 310882 by: Joshua Kehn 310883

Re: [PHP] Class and interface location

2011-01-19 Thread Richard Quadling
On 19 January 2011 07:46, Adam Richardson simples...@gmail.com wrote: On Wed, Jan 19, 2011 at 2:07 AM, Larry Garfield la...@garfieldtech.comwrote: 3) Static analysis.  Instead of reflection, either tokenize or string parse all files to determine what classes implement what interfaces and then

Re: [PHP] Class and interface location

2011-01-19 Thread Steve Staples
On Wed, 2011-01-19 at 01:07 -0600, Larry Garfield wrote: Hi all. I'm trying to come up with a solution to an architectural problem I could use some extra eyes on. I have (or will have) a large code base with lots of classes, spread out over many optional plugin components. These classes,

[PHP] Autorename extracted files from zip-archive

2011-01-19 Thread Merlin Morgenstern
Hello, I am using shell_exec to uncompress zip files which works fine, but has one big problem. Whenever the zip-archive containes an already existing file name, it will overwrite the current one. I need the file to be extracted and autorenamed. This is the code line: $output =

Re: [PHP] switch case madness

2011-01-19 Thread Joshua Kehn
On Jan 18, 2011, at 11:53 PM, Donovan Brooke wrote: The idea of using existing resources for efficiency is very valid indeed.. especially with a job at hand. But, there are good reasons to roll-your-own... education and knowing your own code are 2 that are important to me right now.

RE: [PHP] switch case madness

2011-01-19 Thread Jay Blanchard
[snip] ... [/snip] Imagine when there'll be the day when you do not have to code at all...just copy 'n paste snippets together in the order that you wish them to work in and Voila'! - instant web app. Th!! -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] switch case madness

2011-01-19 Thread Joshua Kehn
On Jan 19, 2011, at 9:43 AM, Jay Blanchard wrote: [snip] ... [/snip] Imagine when there'll be the day when you do not have to code at all...just copy 'n paste snippets together in the order that you wish them to work in and Voila'! - instant web app.

Re: [PHP] switch case madness

2011-01-19 Thread Marc Guay
Imagine when there'll be the day when you do not have to code at all...just copy 'n paste snippets together in the order that you wish them to work in and Voila'! - instant web app. I have a Wordpress plugin that will do all of that for you. -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] Autorename extracted files from zip-archive

2011-01-19 Thread Daniel Brown
On Wed, Jan 19, 2011 at 09:06, Merlin Morgenstern merli...@fastmail.fm wrote: Hello, I am using shell_exec to uncompress zip files which works fine, but has one big problem. Whenever the zip-archive containes an already existing file name, it will overwrite the current one. I need the file to

RE: [PHP] Autorename extracted files from zip-archive

2011-01-19 Thread Tommy Pham
-Original Message- From: Merlin Morgenstern [mailto:merli...@fastmail.fm] Sent: Wednesday, January 19, 2011 6:06 AM To: php-general@lists.php.net Subject: [PHP] Autorename extracted files from zip-archive Hello, I am using shell_exec to uncompress zip files which works fine, but

Re: [PHP] switch case madness

2011-01-19 Thread Daniel Brown
On Tue, Jan 18, 2011 at 23:39, Joshua Kehn josh.k...@gmail.com wrote: Why not use one of the countless, not to mention secure and stable cookie management systems available? If it's an exercise cool, I misunderstood. I'm not one to normally shun people rolling their own code, lord knows I've

Re: [PHP] switch case madness

2011-01-19 Thread Joshua Kehn
On Tue, Jan 18, 2011 at 23:39, Joshua Kehn josh.k...@gmail.com wrote: The use of existing packages is so increasingly prevalent that I have the unfortunate displeasure of knowing many developers who do nothing but this, yet who can't even answer simple questions about general coding, and

Re: [PHP] switch case madness

2011-01-19 Thread David Hutto
.    I do see from where it is you're coming, though, Josh --- once you've gotten the fundamentals, a lot of times it's easier - sometimes even a better idea - to use an existing, mature solution.  What helps you to determine its value from a code standpoint?  Your existing experience. --

Re: [PHP] Autorename extracted files from zip-archive

2011-01-19 Thread Richard Quadling
On 19 January 2011 14:06, Merlin Morgenstern merli...@fastmail.fm wrote: Hello, I am using shell_exec to uncompress zip files which works fine, but has one big problem. Whenever the zip-archive containes an already existing file name, it will overwrite the current one. I need the file to be

Re: [PHP] Class and interface location

2011-01-19 Thread Adam Richardson
On Wed, Jan 19, 2011 at 8:21 AM, Richard Quadling rquadl...@gmail.comwrote: On 19 January 2011 07:46, Adam Richardson simples...@gmail.com wrote: On Wed, Jan 19, 2011 at 2:07 AM, Larry Garfield la...@garfieldtech.com wrote: 3) Static analysis. Instead of reflection, either tokenize or

[PHP] News Server Time Outs

2011-01-19 Thread Al
The newsgroup server seems to have a repeated-visit throttle, or whatever. For the last two weeks at least, I can only open 2 or 3 messages and them I get repeated time-outs. It acts like the DoS or flood prevention is kidding in to aggressively. Al.. -- PHP General Mailing List

Re: [PHP] Class and interface location

2011-01-19 Thread la...@garfieldtech.com
On 1/19/11 10:09 AM, Adam Richardson wrote: On Wed, Jan 19, 2011 at 8:21 AM, Richard Quadlingrquadl...@gmail.comwrote: On 19 January 2011 07:46, Adam Richardsonsimples...@gmail.com wrote: On Wed, Jan 19, 2011 at 2:07 AM, Larry Garfieldla...@garfieldtech.com wrote: 3) Static analysis.

Re: [PHP] Class and interface location

2011-01-19 Thread Richard Quadling
On 19 January 2011 16:23, la...@garfieldtech.com la...@garfieldtech.com wrote: On 1/19/11 10:09 AM, Adam Richardson wrote: On Wed, Jan 19, 2011 at 8:21 AM, Richard Quadlingrquadl...@gmail.comwrote: On 19 January 2011 07:46, Adam Richardsonsimples...@gmail.com  wrote: On Wed, Jan 19, 2011

Re: [PHP] Class and interface location

2011-01-19 Thread Adam Richardson
On Wed, Jan 19, 2011 at 11:23 AM, la...@garfieldtech.com la...@garfieldtech.com wrote: On 1/19/11 10:09 AM, Adam Richardson wrote: On Wed, Jan 19, 2011 at 8:21 AM, Richard Quadlingrquadl...@gmail.com wrote: On 19 January 2011 07:46, Adam Richardsonsimples...@gmail.com wrote: On Wed,

Re: [PHP] Class and interface location

2011-01-19 Thread la...@garfieldtech.com
On 1/19/11 11:16 AM, Adam Richardson wrote: As long as the static analysis tool builds a composite of class hierarchy established in all the files (project wide, at least in terms of the plugin), you wouldn't have to double declare interfaces so they could be detected. Adam That is

Re: [PHP] Class and interface location

2011-01-19 Thread la...@garfieldtech.com
On 1/19/11 10:52 AM, Richard Quadling wrote: There is a pecl extension called inclued [1][2] which could be used I think. It can be used to produce a list of all the relationships between included files, so a one off pass of all the class files (simply include them) and then retrieve the

Re: [PHP] switch case madness

2011-01-19 Thread Micky Hulse
On Wed, Jan 19, 2011 at 6:45 AM, Joshua Kehn josh.k...@gmail.com wrote: On Jan 19, 2011, at 9:43 AM, Jay Blanchard wrote: [snip] ... [/snip] Imagine when there'll be the day when you do not have to code at all...just copy 'n paste snippets together in the order that you wish them to work in

Re: [PHP] switch case madness

2011-01-19 Thread Joshua Kehn
On Jan 19, 2011, at 12:44 PM, Micky Hulse wrote: On Wed, Jan 19, 2011 at 6:45 AM, Joshua Kehn josh.k...@gmail.com wrote: They have that. It's called Ruby on Rails. CodeIgniter and/or Django (Python) are fun. What about a middle of the road solution? Google for php micro framework

Re: [PHP] switch case madness

2011-01-19 Thread Adam Richardson
On Wed, Jan 19, 2011 at 12:44 PM, Micky Hulse mickyhulse.li...@gmail.comwrote: On Wed, Jan 19, 2011 at 6:45 AM, Joshua Kehn josh.k...@gmail.com wrote: On Jan 19, 2011, at 9:43 AM, Jay Blanchard wrote: [snip] ... [/snip] Imagine when there'll be the day when you do not have to code at

RE: [PHP] switch case madness

2011-01-19 Thread Richard Sharp
LOL, so true -Original Message- From: Adam Richardson [mailto:simples...@gmail.com] Sent: Wednesday, January 19, 2011 12:28 PM To: PHP-General Subject: Re: [PHP] switch case madness On Wed, Jan 19, 2011 at 12:44 PM, Micky Hulse mickyhulse.li...@gmail.comwrote: On Wed, Jan 19, 2011 at

Re: [PHP] Class and interface location

2011-01-19 Thread David Harkness
What about creating your own docblock tag such as @plugin-interface? While it still requires each plugin to explicitly define the interface(s) it implements, it won't be in the class declaration. This would be very easy to nab for a tree of files using grep, removing the need to do any static

Re: [PHP] Class and interface location

2011-01-19 Thread la...@garfieldtech.com
On 1/19/11 3:44 PM, David Harkness wrote: What about creating your own docblock tag such as @plugin-interface? While it still requires each plugin to explicitly define the interface(s) it implements, it won't be in the class declaration. This would be very easy to nab for a tree of files using

Re: [PHP] Class and interface location

2011-01-19 Thread Peter Lind
How often would this profiling have to happen? Seems to me that if it's a once per build or once per someone pressing the button, then go for the more expensive analysis checking through the files. Just build up a tree that shows which classes implement what or inherit from where, save that along

RE: [PHP] Class and interface location

2011-01-19 Thread Tommy Pham
-Original Message- From: la...@garfieldtech.com [mailto:la...@garfieldtech.com] Sent: Wednesday, January 19, 2011 2:21 PM To: php-general@lists.php.net Subject: Re: [PHP] Class and interface location On 1/19/11 3:44 PM, David Harkness wrote: What about creating your own docblock

Re: [PHP] Class and interface location

2011-01-19 Thread Larry Garfield
On Wednesday, January 19, 2011 8:56:50 pm Tommy Pham wrote: And actually, thinking about it, I wonder if requiring the explicit declaration is a good thing anyway because then it's immediately obvious and greppable what the class does. :-) --Larry Garfield You mean requiring

[PHP] email address syntax checker

2011-01-19 Thread Donovan Brooke
Hi Guys, I'm waddling my way through database interaction and thought someone on the list may already have a simple email checker that they'd like to share... you know, looking for the @ char and dots etc.. I did a quick search of the archives and found a couple elaborate things.. but I'm

Re: [PHP] email address syntax checker

2011-01-19 Thread David Hutto
On Wed, Jan 19, 2011 at 11:14 PM, Donovan Brooke li...@euca.us wrote: Hi Guys, I'm waddling my way through database interaction and thought someone on the list may already have a simple email checker that they'd like to share... you know, looking for the @ char and dots etc.. I did a quick

RE: [PHP] Class and interface location

2011-01-19 Thread Tommy Pham
-Original Message- From: Larry Garfield [mailto:la...@garfieldtech.com] Sent: Wednesday, January 19, 2011 7:47 PM To: php-general@lists.php.net Subject: Re: [PHP] Class and interface location On Wednesday, January 19, 2011 8:56:50 pm Tommy Pham wrote: And actually, thinking

Re: [PHP] email address syntax checker

2011-01-19 Thread Peter Lind
On 20 January 2011 05:14, Donovan Brooke li...@euca.us wrote: Hi Guys, I'm waddling my way through database interaction and thought someone on the list may already have a simple email checker that they'd like to share... you know, looking for the @ char and dots etc.. I did a quick search