File tree Expand file tree Collapse file tree
src/Dfcplc/PostcodeAnywhere
InternationalBankValidation Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<?php
22namespace Dfcplc \PostcodeAnywhere \BankValidation ;
33
4+ use Dfcplc \PostcodeAnywhere \Exception ;
5+
46class Validate
57{
68
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Dfcplc \PostcodeAnywhere ;
4+
5+ class Exception extends \Exception
6+ {
7+ }
Original file line number Diff line number Diff line change 11<?php
22namespace Dfcplc \PostcodeAnywhere \InternationalBankValidation ;
33
4+ use Dfcplc \PostcodeAnywhere \Exception ;
5+
46class Validate
57{
68
@@ -28,7 +30,7 @@ public function MakeRequest()
2830 //Check for an error, if there is one then throw an exception
2931 if ($ file ->Columns ->Column ->attributes ()->Name == "Error " )
3032 {
31- throw new \ Exception ("[ID] " . $ file ->Rows ->Row ->attributes ()->Error . " [DESCRIPTION] " . $ file ->Rows ->Row ->attributes ()->Description . " [CAUSE] " . $ file ->Rows ->Row ->attributes ()->Cause . " [RESOLUTION] " . $ file ->Rows ->Row ->attributes ()->Resolution );
33+ throw new Exception ("[ID] " . $ file ->Rows ->Row ->attributes ()->Error . " [DESCRIPTION] " . $ file ->Rows ->Row ->attributes ()->Description . " [CAUSE] " . $ file ->Rows ->Row ->attributes ()->Cause . " [RESOLUTION] " . $ file ->Rows ->Row ->attributes ()->Resolution );
3234 }
3335
3436 //Copy the data
Original file line number Diff line number Diff line change 11<?php
22namespace Dfcplc \PostcodeAnywhere \PostcodeAnywhere ;
33
4+ use Dfcplc \PostcodeAnywhere \Exception ;
5+
46class Lookup
57{
68 private $ Key ; //The key to use to authenticate to the service.
@@ -43,7 +45,7 @@ public function MakeRequest()
4345 //Check for an error, if there is one then throw an exception
4446 if ($ file ->Columns ->Column ->attributes ()->Name == "Error " )
4547 {
46- throw new \ Exception ("[ID] " . $ file ->Rows ->Row ->attributes ()->Error . " [DESCRIPTION] " . $ file ->Rows ->Row ->attributes ()->Description . " [CAUSE] " . $ file ->Rows ->Row ->attributes ()->Cause . " [RESOLUTION] " . $ file ->Rows ->Row ->attributes ()->Resolution );
48+ throw new Exception ("[ID] " . $ file ->Rows ->Row ->attributes ()->Error . " [DESCRIPTION] " . $ file ->Rows ->Row ->attributes ()->Description . " [CAUSE] " . $ file ->Rows ->Row ->attributes ()->Cause . " [RESOLUTION] " . $ file ->Rows ->Row ->attributes ()->Resolution );
4749 }
4850
4951 //Copy the data
Original file line number Diff line number Diff line change 11<?php
22namespace Dfcplc \PostcodeAnywhere \PostcodeAnywhere ;
33
4+ use Dfcplc \PostcodeAnywhere \Exception ;
5+
46class FindByParts
57{
68 //Credit: Thanks to Stuart Sillitoe (http://stu.so/me) for the original PHP that these samples are based on.
@@ -42,7 +44,7 @@ public function MakeRequest()
4244 //Check for an error, if there is one then throw an exception
4345 if ($ file ->Columns ->Column ->attributes ()->Name == "Error " )
4446 {
45- throw new \ Exception ("[ID] " . $ file ->Rows ->Row ->attributes ()->Error . " [DESCRIPTION] " . $ file ->Rows ->Row ->attributes ()->Description . " [CAUSE] " . $ file ->Rows ->Row ->attributes ()->Cause . " [RESOLUTION] " . $ file ->Rows ->Row ->attributes ()->Resolution );
47+ throw new Exception ("[ID] " . $ file ->Rows ->Row ->attributes ()->Error . " [DESCRIPTION] " . $ file ->Rows ->Row ->attributes ()->Description . " [CAUSE] " . $ file ->Rows ->Row ->attributes ()->Cause . " [RESOLUTION] " . $ file ->Rows ->Row ->attributes ()->Resolution );
4648 }
4749
4850 //Copy the data
Original file line number Diff line number Diff line change 11<?php
22namespace Dfcplc \PostcodeAnywhere \PostcodeAnywhere ;
33
4+ use Dfcplc \PostcodeAnywhere \Exception ;
5+
46class Retrieve
57{
68 //Credit: Thanks to Stuart Sillitoe (http://stu.so/me) for the original PHP that these samples are based on.
@@ -27,7 +29,7 @@ public function MakeRequest()
2729 //Check for an error, if there is one then throw an exception
2830 if ($ file ->Columns ->Column ->attributes ()->Name == "Error " )
2931 {
30- throw new \ Exception ("[ID] " . $ file ->Rows ->Row ->attributes ()->Error . " [DESCRIPTION] " . $ file ->Rows ->Row ->attributes ()->Description . " [CAUSE] " . $ file ->Rows ->Row ->attributes ()->Cause . " [RESOLUTION] " . $ file ->Rows ->Row ->attributes ()->Resolution );
32+ throw new Exception ("[ID] " . $ file ->Rows ->Row ->attributes ()->Error . " [DESCRIPTION] " . $ file ->Rows ->Row ->attributes ()->Description . " [CAUSE] " . $ file ->Rows ->Row ->attributes ()->Cause . " [RESOLUTION] " . $ file ->Rows ->Row ->attributes ()->Resolution );
3133 }
3234
3335 //Copy the data
You can’t perform that action at this time.
0 commit comments