Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Poll
- {
- public function save()
- {
- if( id !== null )
- $this->update();
- else
- $this->insert();
- // save options
- for( $i=0; $i<$this->options->count(); $i++ )
- $this->getOptionAt($i)->save();
- }
- }
- class PollOption
- {
- public function save()
- {
- if( id !== null )
- $this->update();
- else
- $this->insert();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement