Created
February 4, 2017 10:07
-
-
Save mskvsk/a1578f1f549efb718f8df79c25b2b290 to your computer and use it in GitHub Desktop.
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
<? | |
function process() { | |
$groups = $this->Group_model->getReadyToPublish(); | |
foreach ($groups as $group) { | |
switch ($group->type) { | |
case 'vk': | |
$result = $this->Pub->vk(); | |
break; | |
case 'ok': | |
$result = $this->Pub->ok(); | |
break; | |
case 'tw': | |
$result = $this->Pub->tw(); | |
break; | |
case 'fb': | |
$result = $this->Pub->vk(); | |
break; | |
} | |
switch ($result->error){ | |
case 1: | |
// process error | |
break; | |
case 2: | |
//process error | |
break; | |
... | |
case 0: | |
// charge user and move to next group | |
break; | |
} | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Line 17 needs fb()