-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
HorstOeko
committed
Nov 7, 2024
1 parent
df25c32
commit ba680e6
Showing
4 changed files
with
70 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
/** | ||
* This file is a part of horstoeko/zugferdublbridge. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace horstoeko\zugferdublbridge\traits; | ||
|
||
/** | ||
* Trait for handling and firing callbacks | ||
* | ||
* @category Zugferd-UBL-Bridge | ||
* @package Zugferd-UBL-Bridge | ||
* @author D. Erling <[email protected]> | ||
* @license https://opensource.org/licenses/MIT MIT | ||
* @link https://github.com/horstoeko/zugferdublbridge | ||
*/ | ||
trait HandlesCallbacks | ||
{ | ||
/** | ||
* Internal helper function to fire a callback function | ||
* | ||
* @param callable $callback | ||
* @param array ...$args | ||
* @return mixed | ||
*/ | ||
private function fireCallback($callback, ...$args) | ||
{ | ||
if (!is_callable($callback)) { | ||
return; | ||
} | ||
|
||
return call_user_func($callback, ...$args); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters