note 92707 added to language.namespaces.definition

From: Date: Tue, 04 Aug 2009 20:21:02 +0000
Subject: note 92707 added to language.namespaces.definition
Groups: php.notes 
Request: Send a blank email to php-notes+get-159113@lists.php.net to get a copy of this message
I have written a Packager class that allows to use packages and namespaces. It does require the folder layout. If the __autoload function is not yet "re-implemented", it'll create its own __autoload function. It is written in PHP5 and does not require > PHP5.3, moreover, I don't have PHP5.3 since XAMPP is not adding it yet. Don't ask me why. Since it's over 300 lines long, I am not going to post it here. But if someone would like to have a look? Basic uses: <?php # /classes # /package1 # class34.class.php # /package2 # classone.class.php require_once('packager.class.php'); #Packager::debug(true); Packager::addClasspath(dirname(__FILE__).'/classes', true); // true means that it overrules the predefined set. Packager::addClassSuffix(array('.class.php'),true); // true means that it overrules the predefined set. Packager::import("package1.Class34"); // java-style Packager::import("package2::ClassOne"); // php-style echo Packager::dump(); // show us what you got! ?> ---- Server IP: 213.249.64.162 Probable Submitter: 213.134.237.108 ---- Manual Page -- http://www.php.net/manual/en/language.namespaces.definition.php Edit -- https://master.php.net/note/edit/92707 Del: integrated -- https://master.php.net/note/delete/92707/integrated Del: useless -- https://master.php.net/note/delete/92707/useless Del: bad code -- https://master.php.net/note/delete/92707/bad+code Del: spam -- https://master.php.net/note/delete/92707/spam Del: non-english -- https://master.php.net/note/delete/92707/non-english Del: in docs -- https://master.php.net/note/delete/92707/in+docs Del: other reasons-- https://master.php.net/note/delete/92707 Reject -- https://master.php.net/note/reject/92707 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#159113) next »