Skip to content
This repository has been archived by the owner on Sep 7, 2022. It is now read-only.

Commit

Permalink
Added the ability to get an inexistent property from an object
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukasss93 committed Apr 25, 2020
1 parent 7815801 commit 104fb53
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/TelegramBot.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ public function __construct($token)
//json mapper
$this->mapper = new JsonMapper();
$this->mapper->bStrictNullTypes = false;
$this->mapper->undefinedPropertyHandler = static function($object, $propName, $jsonValue){
$object->{$propName} = $jsonValue;
};

//telegram datas
$this->token = $token;
Expand Down

0 comments on commit 104fb53

Please sign in to comment.