-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprovider.yozm.php
56 lines (47 loc) · 1.17 KB
/
provider.yozm.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
56
<?php
// 요즘을 위한 클래스
class socialxeProviderYozm extends socialxeProvider{
// 인스턴스
function getInstance(&$sessionManager){
static $instance;
if (!isset($instance)) $instance = new socialxeProviderYozm($sessionManager);
return $instance;
}
// 생성자
function socialxeProviderYozm(&$sessionManager){
parent::socialxeProvider('yozm', $sessionManager);
}
// 아이디
function getId(){
if (!$this->isLogged()) return;
return $this->account->user->url_name;
}
// 닉네임
function getNickName(){
if (!$this->isLogged()) return;
return $this->account->user->nickname;
}
// 프로필 이미지
function getProfileImage(){
if (!$this->isLogged()) return;
return $this->account->user->profile_big_img_url;
}
// 링크
function getAuthorLink($id, $nick_name){
return 'http://yozm.daum.net/' . $id;
}
// 리플 형식 반환
function getReplyPrefix($id, $nick_name){
return '@' . $nick_name . '@';
}
// 리플 형식이 포함되었는지 확인
function isContainReply($content){
// '\S' : any none-whitespace
$pattern = '/@\S+@/';
if (preg_match($pattern, $content))
return true;
else
return false;
}
}
?>