mirror of
https://github.com/sitelease/sugar-cube-client.git
synced 2025-11-01 12:32:29 +01:00
Updated RequestChainable Interface and Trait
+ Added a new searchRequestChain() method that will climb up the request chain searching for an object of a certain class + Added some test code for the new method in the TestRun.php file
This commit is contained in:
@ -41,6 +41,18 @@ interface RequestChainableInterface
|
||||
*/
|
||||
public function getRequestChain(): array;
|
||||
|
||||
/**
|
||||
* Climb up the request chain searching for
|
||||
* an object of a certain class
|
||||
*
|
||||
* If the object is found it will be returned,
|
||||
* otherwise the method returns null
|
||||
*
|
||||
* @author Benjamin Blake (sitelease.ca)
|
||||
* @param string $class The class of the object you are searching for
|
||||
* @return object|null
|
||||
*/
|
||||
public function searchRequestChain(string $class): ?object;
|
||||
|
||||
/**
|
||||
* Return the request chain heirarchy
|
||||
|
||||
Reference in New Issue
Block a user