PHP Classes

PHP Plugin System: Extend functionality using plugin classes

Recommend this page to a friend!
  Info   View files Documentation   View files View files (7)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog (1)    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 61%Total: 347 All time: 7,013 This week: 47Up
Version License PHP version Categories
plugin 1.0GNU General Publi...5PHP 5, Language
Description 

Author

This class can extend functionality using plugin classes.

It can check a directory to load a list of plugin classes.

The class can call a given function calling all plugin classes that implement that function.

Picture of Dave Smith
  Performance   Level  
Name: Dave Smith is available for providing paid consulting. Contact Dave Smith .
Classes: 51 packages by
Country: United States United States
Age: 58
All time rank: 618 in United States United States
Week rank: 11 Up3 in United States United States Up
Innovation award
Innovation award
Nominee: 32x

Winner: 7x

Documentation

Class: plugin Version: 1.0 4/19/2015 Copyright 2015 Wagon Trader, All Rights Reserved Description: This class will allow you to develop plugins, expanding the functionality of your applications by triggering method calls across all supplied plugins, called observer classes. Properties of the observer class become available immediately to your application simply by dropping the observer into the plugins folder. Unlike the standard observer model, the observer class does not have to be explicitly set, it is instantiated because it exists. Files: plugin.class.php - Main class example.php - Example usage script /plugins folder - Sample observer class files Installation: Upload files to a web accessible location on your server (eg. public_html) Configuration: The class if configured to work with most server configurations. You can change the following settings in the class should you need to... $rootPath - Leave blank to use the server specified root path to your document root or set the full path yourself. $scriptFolder - Leave blank if this script is installed at the document root or specify the folder where this script is installed. $pluginFolder - Specify the folder off of the script folder where the observer classes are installed. By default this will be a folder named 'pluginclass'. Usage: The included example.php file includes examples on instantiating the class and basic operation instructions. You must follow these naming conventions for observer classes: 1) Observer class file names must have all characters preceding the first decimal point be unique to each file. 2) Class name must match all characters preceding the first decimal point of the file name. This script uses the characters preceding the first decimal point in the file name to track and instantiate the classes. A file named 'member.class.php' must have the class named 'member' and no other file can be named with 'member' preceding the first decimal point. For example, files named: member.class.php and forum.php is okay since one class will be 'member' and the other will be 'forum'. member.class.php and member.php will not work since each class will be 'member'. This script is simply the back end to manage the plug and play scripts you create. You will need to write your own main application and plugin applications, as detailed as you need, to take advantage of this classes features.

  Files folder image Files  
File Role Description
Files folder imagepluginclass (3 files)
Accessible without login Plain text file example.php Example Example
Accessible without login Plain text file manual.txt Doc. Documentation
Plain text file moderator.plugin.php Class Example observer
Plain text file plugin.class.php Class Main Class

  Files folder image Files  /  pluginclass  
File Role Description
  Plain text file forum.plugin.php Class Example observer
  Plain text file member.plugin.php Class Example observer
  Plain text file shopping.plugin.php Class Example observer

 Version Control Unique User Downloads Download Rankings  
 0%
Total:347
This week:0
All time:7,013
This week:47Up
 User Ratings  
 
 All time
Utility:80%StarStarStarStarStar
Consistency:70%StarStarStarStar
Documentation:65%StarStarStarStar
Examples:80%StarStarStarStarStar
Tests:-
Videos:-
Overall:61%StarStarStarStar
Rank:1035