PHP Classes
PHP Classes
elePHPant
Icontem

Notable PHP package: PHP Optional Chaining

Recommend this page to a friend!
  Blog PHP Classes blog   RSS 1.0 feed RSS 2.0 feed   Blog Notable PHP package: ...   Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)  

Author:

Updated on: 2019-10-17

Posted on:

Categories: Notable Packages

Chaining is an approach used by many developers to make a sequence of calls to the functions of the same object by returning the object again to the next function call, so the developer has to write less code to call all the functions in a sequence.

The problem of this approach is that if one of the function calls fails, it may not return the object, thus breaking the sequence.

This package provides a workaround this problem by wrapping the function calls in a "box" class that can queue the function calls and call one function after another, unless one function fails.

Read this article to learn more details about how this notable PHP package works.


 



The package PHP Optional Chaining is one of the few PHP packages that was considered notable recently because it does something that is worth paying attention.

The basic purpose is: Chain class function calls preventing errors

Here follows in more detail what it does:

This class can chain class function calls preventing errors.

It provides a wrapper to a given object so all calls to that object will go through this class in such way can in can queue chained calls to the wrapped object.

The class can all functions of the boxed object that were queued all at once by calling the unbox function of the box object of this class.

Notable PHP packages can be often considered innovative. If this package is also innovative, it can be nominated to the PHP Innovation Award and the author may win prizes and recognition for sharing innovative packages.

If you also developed your own notable or innovative packages consider sharing them, so you can also earn more visibility for your package.



You need to be a registered user or login to post a comment

Login Immediately with your account on:

FacebookGmail
HotmailStackOverflow
GitHubYahoo


Comments:

No comments were submitted yet.




  Blog PHP Classes blog   RSS 1.0 feed RSS 2.0 feed   Blog Notable PHP package: ...   Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)