Guest User

Untitled

a guest
Oct 20th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. // Pull in the network parameters we need
  2. $closure = function($collection_item){
  3. switch ($collection_item->getAccountType())
  4. {
  5. case \Entities\Repositories\NetworkParamsRepository::ACCOUNT_TYPE_MERCHANT:
  6. case \Entities\Repositories\NetworkParamsRepository::ACCOUNT_TYPE_HYBRID:
  7. return true;
  8. }
  9. return false;
  10. };
  11.  
  12. $networkParams = $this->program->getNetwork()->getNetworkParams($closure);
  13.  
  14.  
  15.  
  16.  
  17. **************************
  18.  
  19. /**
  20. *
  21. * @return Doctrine\Common\Collections\Collection $network_params;
  22. */
  23. public function getNetworkParams(\Closure $filter = null)
  24. {
  25. if (!is_null($filter))
  26. {
  27. return $this->network_params->filter($filter);
  28. }
  29. return $this->network_params;
  30. }
Add Comment
Please, Sign In to add comment