Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Conflubulator
- {
- private $foo;
- private $bar;
- private $meh;
- public function __construct($foo, $bar, $meh)
- {
- $this->setFoo();
- $this->setBar();
- $this->setMeh();
- }
- private setFoo($foo)
- {
- //validate here - throw exception if invalid
- $this->foo = $foo;
- }
- private setBar($bar)
- {
- //validate here - throw exception if invalid
- $this->bar = $bar;
- }
- private setMeh($meh)
- {
- //validate here - throw exception if invalid
- $this->meh = $meh;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement