Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- abstract class abstractClieent
- {
- public $debug = false;
- public function send()
- {
- $this->log('ne rabotaet');
- }
- public function log($message)
- {
- if ($this->debug) {
- file_put_contents($this->name . '.log', (new \DateTime('NOW'))->format('Y-m-d H:i:s') . ' ' . $message, FILE_APPEND | LOCK_EX);
- }
- }
- }
- class client extends abstractClient
- {
- public function parampampam()
- {
- $this->log('rabotaet');
- }
- }
- $client = new client();
- $client->enableDebug();
- $client->parampampam();
- $client->send();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement