Dashboard sipadu mbip
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

DelegatedMacroable.php 730B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace Maatwebsite\Excel;
  3. use Illuminate\Support\Traits\Macroable;
  4. trait DelegatedMacroable
  5. {
  6. use Macroable {
  7. __call as __callMacro;
  8. }
  9. /**
  10. * Dynamically handle calls to the class.
  11. *
  12. * @param string $method
  13. * @param array $parameters
  14. *
  15. * @return mixed
  16. */
  17. public function __call($method, $parameters)
  18. {
  19. if (method_exists($this->getDelegate(), $method)) {
  20. return call_user_func_array([$this->getDelegate(), $method], $parameters);
  21. }
  22. array_unshift($parameters, $this);
  23. return $this->__callMacro($method, $parameters);
  24. }
  25. /**
  26. * @return object
  27. */
  28. abstract public function getDelegate();
  29. }