Files
OMS/app/erpapi/lib/channel/ticket.php
2025-12-28 23:13:25 +08:00

36 lines
961 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
/**
* Copyright © ShopeX http://www.shopex.cn. All rights reserved.
* See LICENSE file for license details.
*/
class erpapi_channel_ticket extends erpapi_channel_abstract
{
/**
* 初始化
* @param mixed $node_id ID
* @param mixed $channel_id ID
* @return mixed 返回值
*/
public function init($node_id, $channel_id)
{
$channelMdl = app::get('channel')->model('channel');
$filter = $channel_id ? array('channel_id' => $channel_id) : array('node_id' => $node_id);
$filter['channel_type'] = 'ticket';
$channel = $channelMdl->dump($filter);
if (!$channel) {
return false;
}
$channel['config'] = @unserialize($channel['config']);
$this->__adapter = $channel['channel_adapter'];
$this->__platform = $channel['node_type'];
$this->channel = $channel;
return true;
}
}