Skip to content

Instantly share code, notes, and snippets.

@zamith
Created April 27, 2013 16:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zamith/5473656 to your computer and use it in GitHub Desktop.
Save zamith/5473656 to your computer and use it in GitHub Desktop.
class UserMailer {
private $user;
public function __construct($user)
{
$this->user = $user;
}
public function activation_deliver()
{
echo $this->user->email;
}
}
class User {
public $email = "luis@zamith.pt";
}
$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