Re: alternative to allfiles.php, comments?
| From: | Alexey Borzov | Date: | Mon, 27 Aug 2007 07:51:46 +0000 |
| Subject: | Re: alternative to allfiles.php, comments? | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-47851@lists.php.net to get a copy of this message | ||
Hi,
Gregory Beaver wrote:
Another possible solution to the "make it easy for beginners" problem would be to offer this syntax:I think the whole "make it easy for beginners" argument does not hold water. If their only problem was to include the package's files and then the package would magically do everything the beginner needed, then yes, we should spend time on making it easier to include (and on arguing how to do it). In reality, including the files is 0.1% of work required, since you need to learn the package's API, and actually write the code to use its features. One usually starts with usage examples and / or docs, and those show pretty well what files to include, even now.
<?php require '/full/path/to/PEAR2/PackageName.php'; PEAR2::PackageName::beginnerSetup(); ?> the beginnerSetup() static method would do what allfiles.php does in the current proposal. If we have auto-generated allfiles.php, it would be possible for beginnerSetup() to simply be: static function beginnerSetup() {require dirname(__FILE__) . '/PackageName/allfiles.php';} This should be a more intuitive solution for beginners. Comments? Greg