Created
August 22, 2019 16:41
-
-
Save infinitypaul/5a4ab46b4aac27cac9a3665b14e76f84 to your computer and use it in GitHub Desktop.
This file contains 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 User { | |
/** | |
* @var \Logger | |
*/ | |
public $logger; | |
public function __construct(Logger $logger) | |
{ | |
$this->logger = $logger; | |
} | |
public function create($data){ | |
try { | |
//Save User To Database | |
} catch (Exception $exception){ | |
$this->logger->writeToFile($exception->getMessage()); | |
} | |
} | |
public function edit(){ | |
//Edit User Record | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment