PHP Classes

ubinclude: Include classes and dependencies automatically

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Info   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2009-01-12 (6 years ago) RSS 2.0 feedNot yet rated by the usersTotal: 204 This week: 1All time: 7,518 This week: 1,181Up
Version License PHP version Categories  
ubinclude 1.0Freeware5.0PHP 5, Language
Description Author  

This class can be used to include classes and dependencies automatically.

It can scan one or more directories for class files with given file name extensions. It checks the file contents to see if they contain the definition of classes, interfaces and sub-classes.

The class can include the script file of a given class from the list of scanned directories.

The list of scanned class files can be stored in a cache file to prevent scanning the directories again in future inclusions of a class.

Picture of Reynier Blanco
Name: Reynier Blanco <contact>
Classes: 6 packages by
Country: Cuba Cuba
Age: 30
All time rank: 18503 in Cuba Cuba
Week rank: 938 Up3 in Cuba Cuba Equal

Take into consideration the inclusion of different files sometimes becomes a bit uncomfortable, well, 
this class is made for improving that little inconvenience.

	1. Allows you to include both a class as a file as the case may be
	2. When doing a inclusion also include all units of the file
		whether within the file you wish to include a class that is used is automatically
	3. There is no need to have a static structure as the addresses of where the classes and files are Automatically generated.
	4. Besides the class generates a file "file_cache" with the information generated, so that once cargo is only read the file
		with the information while avoiding a mapping addresses
	5. At the time of creating the object of the class was espedifica the direction you want to be analyzed or maps, can be
		both as an address an array of directions.
	6. If you use the normal constructor of the class always will be analyzed past addresses, however if used
		ubInclude: instance_cache (); ensures utilizacón file cache "file_cache"
As use
	$ include = new ubInclude ($dir_cache); 	//-- address where the cache file is saved
	$ include-> add_path ($dir); 				//-- address to map
	$ include-> load (); 						//-- is necessary to load de information,In case that de cache file exist will be charge
	$ include-> include_class ($class_name); 	//-- includes a class by name
	$ include-> include_file ($file_name); 		//-- includes a file by name
	$ include-> file_dir ("readme_es.txt "); 	//-- returns the address of a file

To give you more functionality
	Sometimes the simple logic is not enough, or for a particular algorithm we have to take files from one another depending recursively
		A Class A Class B requires a while but this one's needs and Class A.
	Here in this example would include a recursive problems which lead to read, and as the reading order for the developer decides what the class is not responsible for this, for this and other situations that might not be designed so far developed a set of commands that allow for greater convenience in making the inclusion of a unit.

When you put one of these commands in a file that is interpreted as:
	@ file file //-- specifies a file dependency
	@ class. class //-- Specify the unit of a class
	@ ignore class //-- Specify the unit of a class that will be ignored for some reason that it is up to developer

	The units are based on the words:
	1. abstract
	2. end
	3. class
	4. interface
	5. new
	6. extends
	7. implements
	8. @ var

	1. it is necessary that all the files and classes are a different name
  Files folder image Files  
File Role Description
Plain text file include.php Class Main Class
Accessible without login Plain text file index.php Example example
Accessible without login Plain text file readme_en.txt Doc. description
Accessible without login Plain text file readme_es.txt Doc. description
Plain text file see.php Class class example

 Version Control Unique User Downloads Download Rankings  
 0%Total:204All time:7,518
 This week:1This week:1,181Up