Skip to content

Instantly share code, notes, and snippets.

@mskvsk
Created February 4, 2017 10:07
Show Gist options
  • Save mskvsk/a1578f1f549efb718f8df79c25b2b290 to your computer and use it in GitHub Desktop.
Save mskvsk/a1578f1f549efb718f8df79c25b2b290 to your computer and use it in GitHub Desktop.
<?
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;
}
}
}
?>
@sidcode
Copy link

sidcode commented Feb 12, 2017

Line 17 needs fb()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment