Last active
April 29, 2017 01:57
-
-
Save joshforbes/dda2c5af7074c04ad49d739b99964514 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<?php | |
public function open() | |
{ | |
if ($this->publishable_type === 'credit') { | |
// verify credit is available and anything else that | |
// needs to be done before a credit job is opened | |
} elseif ($this->publishable_type === 'daily) { | |
// charge credit card or anything that needs to be | |
// done before a daily job is opened | |
} elseif ($this->publishable_type === 'plan' { | |
// an elseif for any other types | |
} | |
$this->status = 'open'; | |
$this->save(); | |
// and any other code that has to be executed when a job is | |
// opened regardless of which publishable type is chosen | |
if ($this->publishable_type === 'credit') { | |
// assign credit to job | |
} elseif ($this->publishable_type === 'daily) { | |
// whatever needs to be done for daily job | |
} elseif ($this->publishable_type === 'plan' { | |
// an elseif for any other types | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment