mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 10:11:38 +09:00
Move all composer files inside the common directory
- 2022년 3월 개발팀 결정사항 적용 - 모듈 등 서드파티 자료 개발시 composer를 사용하면 상위 경로에 있는 코어의 composer.json을 수정하고, 코어의 vendor 디렉토리를 건드리는 것이 기본값임 - 이를 방지하기 위해 코어의 composer.json과 vendor를 common 디렉토리 안으로 이동하여, 모듈 경로에서 상위 폴더로 인식하지 않도록 함
This commit is contained in:
parent
7b912d21fc
commit
5fff6b6eab
1478 changed files with 2 additions and 2 deletions
174
common/vendor/coolsms/php-sdk/app/Nurigo/Api/GroupMessage.php
vendored
Normal file
174
common/vendor/coolsms/php-sdk/app/Nurigo/Api/GroupMessage.php
vendored
Normal file
|
|
@ -0,0 +1,174 @@
|
|||
<?php
|
||||
/* vi:set sw=4 ts=4 expandtab: */
|
||||
|
||||
namespace Nurigo\Api;
|
||||
|
||||
use Nurigo\Coolsms;
|
||||
use Nurigo\Exceptions\CoolsmsSDKException;
|
||||
|
||||
require_once __DIR__ . "/../../../bootstrap.php";
|
||||
|
||||
/**
|
||||
* @class GroupMessage
|
||||
* @brief management group message, using Rest API
|
||||
*/
|
||||
class GroupMessage extends Coolsms
|
||||
{
|
||||
/**
|
||||
* @brief create create group ( HTTP Method GET )
|
||||
* @param object $options {
|
||||
* @param string charset [optional]
|
||||
* @param string srk [optional]
|
||||
* @param string mode [optional]
|
||||
* @param string delay [optional]
|
||||
* @param boolean force_sms [optional]
|
||||
* @param string os_platform [optional]
|
||||
* @param string dev_lang [optional]
|
||||
* @param string sdk_version [optional]
|
||||
* @param string app_version [optional] }
|
||||
* @return object(group_id)
|
||||
*/
|
||||
public function createGroup($options)
|
||||
{
|
||||
return $this->request('new_group', $options);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief get group list ( HTTP Method GET )
|
||||
* @param None
|
||||
* @return array['groupid', 'groupid'...]
|
||||
*/
|
||||
public function getGroupList()
|
||||
{
|
||||
return $this->request('group_list');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief delete groups ( HTTP Method POST )
|
||||
* @param string $group_ids [required]
|
||||
* @return object(count)
|
||||
*/
|
||||
public function deleteGroups($group_ids)
|
||||
{
|
||||
if (!$group_ids) throw new CoolsmsSDKException('group_ids is required', 202);
|
||||
|
||||
$options = new \stdClass();
|
||||
$options->group_ids = $group_ids;
|
||||
return $this->request('delete_groups', $options, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief get group info ( HTTP Method GET )
|
||||
* @param string $group_id [required]
|
||||
* @return object(group_id, message_count)
|
||||
*/
|
||||
public function getGroupInfo($group_id)
|
||||
{
|
||||
if (!$group_id) throw new CoolsmsSDKException('group_id is required', 202);
|
||||
|
||||
$options = new \stdClass();
|
||||
$options->group_id = $group_id;
|
||||
return $this->request(sprintf('groups/%s', $group_id), $options);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief add messages to group ( HTTP Method POST )
|
||||
* @param object $options {
|
||||
* @param string group_id [required]
|
||||
* @param string to [required]
|
||||
* @param string from [required]
|
||||
* @param string text [required]
|
||||
* @param string image_id [optional]
|
||||
* @param string refname [optional]
|
||||
* @param string country [optional]
|
||||
* @param string datetime [optional]
|
||||
* @param string subject [optional]
|
||||
* @param integer delay [optional] }
|
||||
* @return object(success_count, error_count, error_list['index':'code', 'index', 'code'])
|
||||
*/
|
||||
public function addMessages($options)
|
||||
{
|
||||
if (!isset($options->group_id) || !isset($options->to) || !isset($options->text) || !isset($options->from)) {
|
||||
throw new CoolsmsSDKException('group_id, to, text, from is required', 202);
|
||||
}
|
||||
|
||||
return $this->request(sprintf('groups/%s/add_messages', $options->group_id), $options, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief add json type messages to group ( HTTP Method POST )
|
||||
* @param object $options {
|
||||
* @param string group_id [required]
|
||||
* @param string messages [required] [{
|
||||
* @param string to [required]
|
||||
* @param string from [required]
|
||||
* @param string text [required]
|
||||
* @param string image_id [optional]
|
||||
* @param string refname [optional]
|
||||
* @param string country [optional]
|
||||
* @param string datetime [optional]
|
||||
* @param string subject [optional]
|
||||
* @param integer delay [optional] }] }
|
||||
* @return array[object(success_count, error_count, error_list['index':'code', 'index', 'code']), ...]
|
||||
*/
|
||||
public function addMessagesJSON($options)
|
||||
{
|
||||
if (!isset($options->group_id) || !isset($options->messages)) throw new CoolsmsSDKException('group_id and messages is required', 202);
|
||||
foreach ($options->messages as $val) {
|
||||
if (!isset($val->to) || !isset($val->text) || !isset($val->from)) {
|
||||
throw new CoolsmsSDKException('to, text, from is required', 202);
|
||||
}
|
||||
}
|
||||
|
||||
$options->messages = json_encode($options->messages);
|
||||
return $this->request(sprintf('groups/%s/add_messages.json', $options->group_id), $options, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief get message list ( HTTP Method GET )
|
||||
* @param string $group_id [required]
|
||||
* @param integer $offset [optional]
|
||||
* @param integer $limit [optional]
|
||||
* @return object(total_count, offset, limit, list['message_id', 'message_id' ...])
|
||||
*/
|
||||
public function getMessageList($group_id, $offset = 0, $limit = 20)
|
||||
{
|
||||
if (!$group_id) throw new CoolsmsSDKException('group_id is required', 202);
|
||||
|
||||
$options = new \stdClass();
|
||||
$options->group_id = $group_id;
|
||||
$options->offset = $offset;
|
||||
$options->limit = $limit;
|
||||
return $this->request(sprintf('groups/%s/message_list', $options->group_id), $options);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief delete message from group ( HTTP Method POST )
|
||||
* @param string $group_id [required]
|
||||
* @param string $message_ids [required]
|
||||
* @return object(success_count)
|
||||
*/
|
||||
public function deleteMessages($group_id, $message_ids)
|
||||
{
|
||||
if (!$group_id || !$message_ids) throw new CoolsmsSDKException('group_id and message_ids are required', 202);
|
||||
|
||||
$options = new \stdClass();
|
||||
$options->group_id = $group_id;
|
||||
$options->message_ids = $message_ids;
|
||||
return $this->request(sprintf('groups/%s/delete_messages', $options->group_id), $options, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief send group message ( HTTP Method POST )
|
||||
* @param string $group_id [required]
|
||||
* @return object(group_id)
|
||||
*/
|
||||
public function sendGroupMessage($group_id)
|
||||
{
|
||||
if (!$group_id) throw new CoolsmsSDKException('group_id is required', 202);
|
||||
|
||||
$options = new \stdClass();
|
||||
$options->group_id = $group_id;
|
||||
return $this->request(sprintf('groups/%s/send', $group_id), $options, true);
|
||||
}
|
||||
}
|
||||
74
common/vendor/coolsms/php-sdk/app/Nurigo/Api/Image.php
vendored
Normal file
74
common/vendor/coolsms/php-sdk/app/Nurigo/Api/Image.php
vendored
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
<?php
|
||||
/* vi:set sw=4 ts=4 expandtab: */
|
||||
|
||||
namespace Nurigo\Api;
|
||||
|
||||
use Nurigo\Coolsms;
|
||||
use Nurigo\Exceptions\CoolsmsSDKException;
|
||||
|
||||
require_once __DIR__ . "/../../../bootstrap.php";
|
||||
|
||||
/**
|
||||
* @class Image
|
||||
* @brief management image, using Rest API
|
||||
*/
|
||||
class Image extends Coolsms
|
||||
{
|
||||
/**
|
||||
* @brief get image list( HTTP Method GET )
|
||||
* @param integer $offset [optional]
|
||||
* @param integer $limit [optional]
|
||||
* @return object(total_count, offset, limit, list['image_id', 'image_id' ...])
|
||||
*/
|
||||
public function getImageList($offset = null, $limit = null)
|
||||
{
|
||||
$options = new \stdClass();
|
||||
$options->offset = $offset;
|
||||
$options->limit = $limit;
|
||||
return $this->request('image_list', $options);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief get image info ( HTTP Method GET )
|
||||
* @param string $image_id [required]
|
||||
* @return object(image_id, file_name, original_name, file_size, width, height)
|
||||
*/
|
||||
public function getImageInfo($image_id)
|
||||
{
|
||||
if (!$image_id) throw new CoolsmsSDKException('image_id is required', 202);
|
||||
|
||||
$options = new \stdClass();
|
||||
$options->image_id = $image_id;
|
||||
return $this->request(sprintf('images/%s', $image_id), $options);;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief upload image ( HTTP Method POST )
|
||||
* @param mixed $image [required]
|
||||
* @param string $encoding [optional]
|
||||
* @return object(image_id)
|
||||
*/
|
||||
public function uploadImage($image, $encoding = null)
|
||||
{
|
||||
if (!$image) throw new CoolsmsSDKException('image is required', 202);
|
||||
|
||||
$options = new \stdClass();
|
||||
$options->image = $image;
|
||||
$options->encoding = $encoding;
|
||||
return $this->request('upload_image', $options, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief delete images ( HTTP Method POST )
|
||||
* @param string $image_ids [required]
|
||||
* @return object(success_count)
|
||||
*/
|
||||
public function deleteImages($image_ids)
|
||||
{
|
||||
if (!$image_ids) throw new CoolsmsSDKException('image_ids is required', 202);
|
||||
|
||||
$options = new \stdClass();
|
||||
$options->image_ids = $image_ids;
|
||||
return $this->request('delete_images', $options, true);
|
||||
}
|
||||
}
|
||||
108
common/vendor/coolsms/php-sdk/app/Nurigo/Api/Message.php
vendored
Normal file
108
common/vendor/coolsms/php-sdk/app/Nurigo/Api/Message.php
vendored
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
<?php
|
||||
/* vi:set sw=4 ts=4 expandtab: */
|
||||
|
||||
namespace Nurigo\Api;
|
||||
|
||||
use Nurigo\Coolsms;
|
||||
use Nurigo\Exceptions\CoolsmsSDKException;
|
||||
|
||||
require_once __DIR__ . "/../../../bootstrap.php";
|
||||
|
||||
/**
|
||||
* @class Message
|
||||
* @brief management message, using Rest API
|
||||
*/
|
||||
class Message extends Coolsms
|
||||
{
|
||||
/**
|
||||
* @brief send message ( HTTP Method POST )
|
||||
* @param object $options {
|
||||
* @param string to [required]
|
||||
* @param string from [required]
|
||||
* @param string text [required]
|
||||
* @param string type [optional]
|
||||
* @param mixed image [optional]
|
||||
* @param string image_encoding [optional]
|
||||
* @param string refname [optional]
|
||||
* @param mixed country [optional]
|
||||
* @param string datetime [optional]
|
||||
* @param string subject [optional]
|
||||
* @param string charset [optional]
|
||||
* @param string srk [optional]
|
||||
* @param string mode [optional]
|
||||
* @param string extension [optional]
|
||||
* @param integer delay [optional]
|
||||
* @param boolean force_sms [optional]
|
||||
* @param string app_version [optional] }
|
||||
* @return object(recipient_number, group_id, message_id, result_code, result_message)
|
||||
*/
|
||||
public function send($options)
|
||||
{
|
||||
// check require fields. ( 'to, from, 'text' )
|
||||
if (!isset($options->to) || !isset($options->from) || !isset($options->text)) throw new CoolsmsSDKException('"to, from, text" must be entered', 202);
|
||||
|
||||
return $this->request('send', $options, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief sent message list ( HTTP Method GET )
|
||||
* @param object $options {
|
||||
* @param integer offset [optional]
|
||||
* @param integer limit [optional]
|
||||
* @param string rcpt [optional]
|
||||
* @param string start [optional]
|
||||
* @param string end [optional]
|
||||
* @param string status [optional]
|
||||
* @param string status [optional]
|
||||
* @param string resultcode [optional]
|
||||
* @param string notin_resultcode [optional]
|
||||
* @param string message_id [optional]
|
||||
* @param string group_id [optional] }
|
||||
* @return object(total count, list_count, page, data['type', 'accepted_time', 'recipient_number', 'group_id', 'message_id', 'status', 'result_code', 'result_message', 'sent_time', 'text'])
|
||||
*/
|
||||
public function sent($options = null)
|
||||
{
|
||||
return $this->request('sent', $options);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief cancel reserve message. mid or gid either one must be entered. ( HTTP Method POST )
|
||||
* @param string $mid [optional]
|
||||
* @param string $gid [optional]
|
||||
* @return None
|
||||
*/
|
||||
public function cancel($mid = null, $gid = null)
|
||||
{
|
||||
// mid or gid is empty. throw exception
|
||||
if (!$mid && !$gid) throw new CoolsmsSDKException('mid or gid either one must be entered', 202);
|
||||
|
||||
$options = new \stdClass();
|
||||
if ($mid) $options->mid = $mid;
|
||||
if ($gid) $options->gid = $gid;
|
||||
return $this->request('cancel', $options, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief get remaining balance ( HTTP Method GET )
|
||||
* @param None
|
||||
* @return object(cash, point)
|
||||
*/
|
||||
public function getBalance()
|
||||
{
|
||||
return $this->request('balance');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief get status ( HTTP Method GET )
|
||||
* @param object $options {
|
||||
* @param integer count [optional]
|
||||
* @param string unit [optional]
|
||||
* @param string date [optional]
|
||||
* @param integer channel [optional] }
|
||||
* @return object(registdate, sms_average, sms_sk_average, sms_kt_average, sms_lg_average, mms_average, mms_sk_average, mms_kt_average, mms_lg_average)
|
||||
*/
|
||||
public function getStatus($options = null)
|
||||
{
|
||||
return $this->request('status', $options);
|
||||
}
|
||||
}
|
||||
116
common/vendor/coolsms/php-sdk/app/Nurigo/Api/SenderID.php
vendored
Normal file
116
common/vendor/coolsms/php-sdk/app/Nurigo/Api/SenderID.php
vendored
Normal file
|
|
@ -0,0 +1,116 @@
|
|||
<?php
|
||||
/* vi:set sw=4 ts=4 expandtab: */
|
||||
|
||||
namespace Nurigo\Api;
|
||||
|
||||
use Nurigo\Coolsms;
|
||||
use Nurigo\Exceptions\CoolsmsSDKException;
|
||||
|
||||
require_once __DIR__ . "/../../../bootstrap.php";
|
||||
|
||||
/**
|
||||
* @class SenderID
|
||||
* @brief management sender id, using Rest API
|
||||
*/
|
||||
class SenderID extends Coolsms
|
||||
{
|
||||
/**
|
||||
* @brief change api name and api version
|
||||
* @param string $api_key [required]
|
||||
* @param string $api_secret [required]
|
||||
* @param boolean $basecamp [optional]
|
||||
* @return object(group_id)
|
||||
*/
|
||||
function __construct($api_key, $api_secret, $basecamp = false)
|
||||
{
|
||||
// set api_key and api_secret
|
||||
parent::__construct($api_key, $api_secret, $basecamp);
|
||||
|
||||
// set API and version
|
||||
$this->setApiConfig("senderid", "1.1");
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief sender id registration request ( HTTP Method POST )
|
||||
* @param string $phone [required]
|
||||
* @param string $site_user [optional]
|
||||
* @return object(handle_key, ars_number)
|
||||
*/
|
||||
public function register($phone, $site_user = null)
|
||||
{
|
||||
if (!$phone) throw new CoolsmsSDKException('phone number is required', 202);
|
||||
|
||||
$options = new \stdClass();
|
||||
$options->phone = $phone;
|
||||
$options->site_user = $site_user;
|
||||
return $this->request('register', $options, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief verify sender id ( HTTP Method POST )
|
||||
* @param string $handle_key [required]
|
||||
* @return none
|
||||
*/
|
||||
public function verify($handle_key)
|
||||
{
|
||||
if (!$handle_key) throw new CoolsmsSDKException('handle_key is required', 202);
|
||||
|
||||
$options = new \stdClass();
|
||||
$options->handle_key = $handle_key;
|
||||
return $this->request('verify', $options, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief delete sender id ( HTTP Method POST )
|
||||
* @param string $handle_key [required]
|
||||
* @return none
|
||||
*/
|
||||
public function delete($handle_key)
|
||||
{
|
||||
if (!$handle_key) throw new CoolsmsSDKException('handle_key is required', 202);
|
||||
|
||||
$options = new \stdClass();
|
||||
$options->handle_key = $handle_key;
|
||||
return $this->request('delete', $options, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief get sender id list ( HTTP Method GET )
|
||||
* @param string $site_user [optional]
|
||||
* @return object(site_user, idno, phone_number, flag_default, updatetime, regdate)
|
||||
*/
|
||||
public function getSenderidList($site_user = null)
|
||||
{
|
||||
$options = new \stdClass();
|
||||
$options->site_user = $site_user;
|
||||
return $this->request('list', $options);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief set default sender id ( HTTP Method POST )
|
||||
* @param string $handle_key [required]
|
||||
* @param string $site_user [optional]
|
||||
* @return none
|
||||
*/
|
||||
public function setDefault($handle_key, $site_user = null)
|
||||
{
|
||||
if (!$handle_key) throw new CoolsmsSDKException('handle_key is required', 202);
|
||||
|
||||
$options = new \stdClass();
|
||||
$options->handle_key = $handle_key;
|
||||
$options->site_user = $site_user;
|
||||
return $this->request('set_default', $options, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief get default sender id ( HTTP Method GET )
|
||||
* @param string $site_user [optional]
|
||||
* @return object(handle_key, phone_number)
|
||||
*/
|
||||
public function getDefault($site_user = null)
|
||||
{
|
||||
$options = new \stdClass();
|
||||
$options->site_user = $site_user;
|
||||
return $this->request('get_default', $options);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue