Created
October 7, 2016 12:58
-
-
Save icambridge/7cd4c7e650a0e61335f8774f1cf955d8 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 | |
class Transfer | |
{ | |
public $field; | |
} | |
class Sender | |
{ | |
protected $esp; | |
public function __construct($esp) | |
{ | |
$this->esp = $esp; | |
} | |
public function sendEmail($person) | |
{ | |
$transfer = $this->createTransfer(); | |
$transfer->field = "some data"; | |
return $this->esp->send($transfer); | |
} | |
protected function createTransfer() | |
{ | |
return new Transfer(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment