/
Skype.php
55 lines (48 loc) · 1.09 KB
/
Skype.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
/**
* @link https://github.com/Vintage-web-production/yii2-lets-talk
* @copyright Copyright (c) 2017 Vintage Web Production
* @license BSD 3-Clause License
*/
namespace vintage\lets\talk\drivers;
use vintage\lets\talk\base\MessengerDriver;
/**
* Driver for Skype.
*
* On desktop (Windows) with installed application will be opened chat/call in application.
* On mobile devices with installed application will be opened just application.
*
* @author Vladimir Kuprienko <vldmr.kuprienko@gmail.com>
* @since 1.0
*/
class Skype extends MessengerDriver
{
/**
* @var string Nickname from Skype.
*/
protected $contactData;
/**
* @var bool
*/
private $_isCall = false;
/**
* Setter for is call.
*
* @param bool $isCall
*/
public function setIsCall($isCall)
{
$this->_isCall = $isCall;
}
/**
* Returns pattern.
*
* @return string
*/
protected function getPattern()
{
return $this->_isCall
? 'skype:{contact-data}?call'
: 'skype:{contact-data}?chat';
}
}