Created
April 27, 2013 16:23
-
-
Save zamith/5473656 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
class UserMailer { | |
private $user; | |
public function __construct($user) | |
{ | |
$this->user = $user; | |
} | |
public function activation_deliver() | |
{ | |
echo $this->user->email; | |
} | |
} | |
class User { | |
public $email = "[email protected]"; | |
} | |
$user = new User; | |
$mailer = new UserMailer($user); | |
$mailer->activation_deliver(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment