PHP Classes

Chaining functions: Apply a chain of functions to a variable value

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 43%Total: 350 All time: 6,996 This week: 455Up
Version License PHP version Categories
chaining-functions 0.2MIT/X Consortium ...3.0PHP 5, Language
Description 

Author

This class can apply a chain of functions to a variable value.

It can take the value of a variable and calls functions passing its value as parameter.

The result of those functions is stored in a class variable and the class object is returned, so other functions may be called in a chain.

Innovation Award
PHP Programming Innovation award nominee
September 2013
Number 8
Some applications need to call multiple PHP functions one after another in a chain but sometimes the resulting code is not very readable.

This class provides a solution that can call given global PHP functions in a chain.

The functions return the class object, so the function calls can be chained.

The resulting value is stored in a class variable, so it can be passed to the next function in the chain.

Manuel Lemos
Picture of Augustinas Malinauskas
  Performance   Level  
Name: Augustinas Malinauskas <contact>
Classes: 1 package by
Country: United Kingdom
Age: 33
All time rank: 3695159 in United Kingdom
Week rank: 227 Up14 in United Kingdom Up
Innovation award
Innovation award
Nominee: 1x

  Files folder image Files (2)  
File Role Description
Plain text file Chaining.class.php Class Chaining functions method
Accessible without login Plain text file examples.php Example A few examples of chaining class

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:350
This week:0
All time:6,996
This week:455Up
User Ratings User Comments (3)
 All time
Utility:56%StarStarStar
Consistency:75%StarStarStarStar
Documentation:-
Examples:75%StarStarStarStar
Tests:-
Videos:-
Overall:43%StarStarStar
Rank:3600
 
I can understand this is a nice thing to play around with, bu...
10 years ago (iltar van der berg)
12%Star
good
11 years ago (shyam6511)
57%StarStarStar
good
11 years ago (Rahul Shambharkar)
70%StarStarStarStar