-
Notifications
You must be signed in to change notification settings - Fork 329
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #306 from TelegramBot/feature/types
Update types
- Loading branch information
Showing
10 changed files
with
728 additions
and
40 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<?php | ||
|
||
namespace TelegramBot\Api\Types; | ||
|
||
use TelegramBot\Api\BaseType; | ||
use TelegramBot\Api\TypeInterface; | ||
|
||
class ChatLocation extends BaseType implements TypeInterface | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
* | ||
* @var array | ||
*/ | ||
static protected $requiredParams = ['location', 'address']; | ||
|
||
/** | ||
* {@inheritdoc} | ||
* | ||
* @var array | ||
*/ | ||
static protected $map = [ | ||
'location' => Location::class, | ||
'address' => true, | ||
]; | ||
|
||
/** | ||
* The location to which the supergroup is connected. Can't be a live location. | ||
* | ||
* @var Location | ||
*/ | ||
protected $location; | ||
|
||
/** | ||
* Location address; 1-64 characters, as defined by the chat owner | ||
* | ||
* @var string | ||
*/ | ||
protected $address; | ||
|
||
/** | ||
* @return Location | ||
*/ | ||
public function getLocation() | ||
{ | ||
return $this->location; | ||
} | ||
|
||
/** | ||
* @param Location $location | ||
*/ | ||
public function setLocation($location) | ||
{ | ||
$this->location = $location; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getAddress() | ||
{ | ||
return $this->address; | ||
} | ||
|
||
/** | ||
* @param string $address | ||
*/ | ||
public function setAddress($address) | ||
{ | ||
$this->address = $address; | ||
} | ||
} |
Oops, something went wrong.