repo stringlengths 7 63 | file_url stringlengths 81 284 | file_path stringlengths 5 200 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:02:33 2026-01-05 05:24:06 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/src/jegarn/packet/ChatPacket.php | src/jegarn/packet/ChatPacket.php | <?php
namespace jegarn\packet;
class ChatPacket extends Packet {
protected $type = 'chat';
public function getSubType() {
return isset($this->content['type']) ? $this->content['type'] : null;
}
public function setSubType($value){
if(!isset($this->content['type'])){
$this... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/src/jegarn/listener/ChatPacketListener.php | src/jegarn/listener/ChatPacketListener.php | <?php
namespace jegarn\listener;
use jegarn\packet\Packet;
use jegarn\session\Session;
use jegarn\manager\OfflineMessageManager;
use jegarn\manager\ServerManager;
use jegarn\manager\SessionManager;
use jegarn\packet\ChatPacket;
use jegarn\log\Logger;
class ChatPacketListener implements PacketInterface{
public ... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/src/jegarn/listener/ChatroomPacketListener.php | src/jegarn/listener/ChatroomPacketListener.php | <?php
namespace jegarn\listener;
use jegarn\manager\ChatroomManager;
use jegarn\packet\ChatroomPacket;
use jegarn\packet\Packet;
use jegarn\session\Session;
use jegarn\manager\ServerManager;
use jegarn\manager\SessionManager;
use jegarn\packet\GroupChatPacket;
use jegarn\log\Logger;
class ChatroomPacketListener imp... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/src/jegarn/listener/GroupChatPacketListener.php | src/jegarn/listener/GroupChatPacketListener.php | <?php
namespace jegarn\listener;
use jegarn\manager\GroupManager;
use jegarn\packet\Packet;
use jegarn\session\Session;
use jegarn\manager\OfflineGroupMessageManager;
use jegarn\manager\ServerManager;
use jegarn\manager\SessionManager;
use jegarn\packet\GroupChatPacket;
use jegarn\log\Logger;
class GroupChatPacketL... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/src/jegarn/listener/SessionInterface.php | src/jegarn/listener/SessionInterface.php | <?php
namespace jegarn\listener;
use jegarn\session\Session;
interface SessionInterface {
public function filterSession(Session $session);
public function addSession(Session $session);
public function removeSession(Session $session);
} | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/src/jegarn/listener/AuthPacketListener.php | src/jegarn/listener/AuthPacketListener.php | <?php
namespace jegarn\listener;
use jegarn\packet\Packet;
use jegarn\session\Session;
use jegarn\manager\ServerManager;
use jegarn\manager\SessionManager;
use jegarn\packet\AuthPacket;
use jegarn\log\Logger;
use jegarn\util\TextUtil;
class AuthPacketListener implements PacketInterface{
public function dispatc... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/src/jegarn/listener/PacketInterface.php | src/jegarn/listener/PacketInterface.php | <?php
namespace jegarn\listener;
use jegarn\packet\Packet;
use jegarn\session\Session;
interface PacketInterface {
public function dispatchReceivePacket(Packet $packet, Session $session);
public function dispatchSendPacket(Packet $packet, Session $toUserSession);
public function dispatchOfflinePacket(Se... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/src/jegarn/listener/NotificationPacketListener.php | src/jegarn/listener/NotificationPacketListener.php | <?php
namespace jegarn\listener;
use jegarn\manager\OfflineNotificationMessageManager;
use jegarn\packet\NotificationPacket;
use jegarn\packet\Packet;
use jegarn\session\Session;
use jegarn\manager\ServerManager;
use jegarn\manager\SessionManager;
use jegarn\packet\ChatPacket;
use jegarn\log\Logger;
class Notificat... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/tests/app/AppTestBase.php | tests/app/AppTestBase.php | <?php
use jegarn\cache\Cache;
use jegarn\packet\Notification;
use minions\base\Code;
use minions\util\CurlUtil;
abstract class AppTestBase extends PHPUnit_Framework_TestCase {
const IMAGE = 'image.jpg';
const VOICE = 'voice.mp3';
const ARCHIVE = 'archive.zip';
protected function getFile($file){
... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/tests/app/bootstrap.php | tests/app/bootstrap.php | <?php
use jegarn\cache\Cache;
use minions\db\Db;
define('PIC_HOST', '/upload/');
define('TEST_HOST', 'http://192.168.199.243');
require __DIR__ . '/../../examples/web-chat-system/src/bootstrap.php';
require __DIR__ . '/../../sdk/php/src/jegarn.php';
require __DIR__ . '/AppTestBase.php';
$config = new \Yaf\Config\Ini... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/tests/app/module/RosterTest.php | tests/app/module/RosterTest.php | <?php
use jegarn\packet\FriendAgreeNotification;
use jegarn\packet\FriendRequestNotification;
use minions\manager\RosterManager;
use minions\model\RosterGroup;
use minions\model\Roster;
use minions\util\ConvertUtil;
class RosterTest extends AppTestBase {
/**
* 1. create two user
* 2. a user ask for b t... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/tests/app/module/UserTest.php | tests/app/module/UserTest.php | <?php
use minions\manager\UserManager;
use minions\model\User;
use minions\util\ConvertUtil;
class UserTest extends AppTestBase {
/**
* 1. create a user
* 2. update this user
* 3. make this user login
* 4. delete this user
*/
public function testUser(){
// create a user
... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/tests/app/module/GroupTest.php | tests/app/module/GroupTest.php | <?php
use jegarn\packet\GroupAgreeNotification;
use jegarn\packet\GroupQuitNotification;
use jegarn\packet\GroupRefusedNotification;
use jegarn\packet\GroupRequestNotification;
use minions\model\Group;
use minions\model\GroupUser;
use minions\model\User;
use minions\util\ConvertUtil;
class GroupTest extends AppTestBa... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/tests/server/client.php | tests/server/client.php | <?php
use jegarn\packet\Packet;
use jegarn\packet\AuthPacket;
use jegarn\packet\TextChatPacket;
use jegarn\packet\TextChatroomPacket;
use jegarn\packet\TextGroupChatPacket;
use jegarn\util\ConvertUtil;
require __DIR__ . '/../../src/bootstrap.php';
require __DIR__ . '/module/initData.php';
if($argc !== 6){
echo "ex... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/tests/server/bootstrap.php | tests/server/bootstrap.php | <?php
require __DIR__ . '/../../src/bootstrap.php';
$config = require __DIR__ . '/../../examples/web-chat-system/config/server.php';
\jegarn\cache\Cache::getInstance()->initConfig($config['cache']); | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/tests/server/benchmark.php | tests/server/benchmark.php | <?php
use jegarn\manager\ChatroomManager;
use jegarn\manager\GroupManager;
use jegarn\manager\UserManager;
use jegarn\packet\Packet;
use jegarn\packet\AuthPacket;
use jegarn\packet\TextChatPacket;
use jegarn\packet\TextChatroomPacket;
use jegarn\packet\TextGroupChatPacket;
use jegarn\util\ConvertUtil;
require __DIR__ ... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/tests/server/module/ClientInitTest.php | tests/server/module/ClientInitTest.php | <?php
use jegarn\manager\ChatroomManager;
use jegarn\manager\GroupManager;
use jegarn\manager\UserManager;
class ClientInitTest extends PHPUnit_Framework_TestCase {
/**
* 1. create three user
* 2. create a normal group and make three people in
* 3. create a chatroom, and make three in
*/
... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/tests/server/module/initData.php | tests/server/module/initData.php | <?php
$users = [['uid' => 1000000, 'account' => 'yaoguai1000000', 'password' => '123456'],
['uid' => 1000001, 'account' => 'tester1000001', 'password' => '123456'],
['uid' => 1000002, 'account' => 'jack1000002', 'password' => '123456']];
$groupId = 2000000;
$chatroomId = 2000001; | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/tests/server/module/ClientClearTest.php | tests/server/module/ClientClearTest.php | <?php
use jegarn\manager\ChatroomManager;
use jegarn\manager\GroupManager;
use jegarn\manager\UserManager;
class ClientClearTest extends PHPUnit_Framework_TestCase {
public function testClear(){
/**
* @var array $users
* @var integer $groupId
* @var integer $chatroomId
... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/tests/websocket/init.php | tests/websocket/init.php | <?php
if($argc != 3){
echo "php init.php server_host server_port\n";exit;
}
$host = $argv[1];
$port = $argv[2];
require __DIR__ . '/../server/module/initData.php';
$tpl = <<<EOF
<script src="jegarn.js"></script>
<script>
jegarn.debug = false;
var globalRecord = {
host : '{host}',
port : {... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/server.php | examples/web-chat-system/server.php | <?php
use jegarn\cache\Cache;
use jegarn\log\FileLoggerHandler;
use jegarn\log\Logger;
use jegarn\manager\ServerManager;
use jegarn\manager\PacketManager;
use jegarn\server\SwooleServer;
require __DIR__ . '/../../src/bootstrap.php';
$config = require __DIR__ . '/config/server.php';
isset($argv[1]) && ($config['server... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/webserver.php | examples/web-chat-system/webserver.php | <?php
use jegarn\cache\Cache;
use jegarn\log\FileLoggerHandler;
use jegarn\log\Logger;
use jegarn\manager\ServerManager;
use jegarn\manager\PacketManager;
use jegarn\server\SwooleWebServer;
require __DIR__ . '/../../src/bootstrap.php';
$config = require __DIR__ . '/config/webserver.php';
isset($argv[1]) && ($config['... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/install.php | examples/web-chat-system/install.php | <?php
/**
* steps:
* 1. install mysql schema
* 2. create user 'counter'
* 3. create groupchat 'Counter Group'
* 4. create chatroom 'Counter Room'
* 5. create robot_counter config file
*/
// library minions
require __DIR__ . '/src/bootstrap.php';
// library jegarn
require __DIR__ . '/../../sdk/php/src/jegarn.ph... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/robot_counter.php | examples/web-chat-system/robot_counter.php | <?php
/**
* please see $introduction.
*/
global $introduction;
$introduction = <<<EOF
I am a robot of counter, what? I am the first member of the system "minions" what's the chat system.
I created a group "Counter Group" and a chatroom "Counter Room" when I was born. And when you join the system,
I will be your fri... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/app/public/index.php | examples/web-chat-system/app/public/index.php | <?php
define('UPLOAD_PATH', __DIR__ . '/upload');
define('PIC_HOST', '/upload/');
define('APPLICATION_PATH', substr(__FILE__, 0, -17));
$application = new \Yaf\Application(APPLICATION_PATH . "/../config/application.ini");
$application->bootstrap()->run(); | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/app/application/Bootstrap.php | examples/web-chat-system/app/application/Bootstrap.php | <?php
use jegarn\cache\Cache;
use jegarn\server\Server;
use \Yaf\Dispatcher;
use \minions\http\ApiPluginBase;
use \minions\db\Db;
// include server sdk
require_once __DIR__ . '/../../../../sdk/php/src/jegarn.php';
class Bootstrap extends Yaf\Bootstrap_Abstract{
public function _initDb(){
Db::getInstanc... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/app/application/controllers/User.php | examples/web-chat-system/app/application/controllers/User.php | <?php
use minions\manager\LoginLogManager;
use minions\upload\UploadFile;
use minions\manager\UserManager;
use minions\model\User;
use minions\http\ApiRequest;
use minions\http\ApiResponse;
use minions\base\Code;
use minions\util\TextUtil;
use minions\upload\Uploader;
use minions\http\ApiControllerBase;
class UserCon... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/app/application/controllers/Error.php | examples/web-chat-system/app/application/controllers/Error.php | <?php
use Yaf\Controller_Abstract;
use minions\http\ApiResponse;
use minions\base\Code;
class ErrorController extends Controller_Abstract{
public function errorAction(\Exception $exception) {
$exceptionCode = $exception->getCode();
if($exceptionCode > 0){
$responseObj = new ApiRespons... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/app/application/controllers/Roster.php | examples/web-chat-system/app/application/controllers/Roster.php | <?php
use minions\manager\UserManager;
use minions\model\Base;
use minions\model\RosterGroup;
use minions\model\Roster;
use minions\manager\RosterManager;
use minions\manager\RosterGroupManager;
use minions\http\ApiRequest;
use minions\http\ApiResponse;
use minions\http\ApiControllerBase;
use minions\base\Code;
class... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/app/application/controllers/Group.php | examples/web-chat-system/app/application/controllers/Group.php | <?php
use minions\base\Code;
use minions\manager\GroupManager;
use minions\manager\GroupUserManager;
use minions\model\Group;
use minions\model\GroupUser;
use minions\http\ApiRequest;
use minions\http\ApiResponse;
use minions\http\ApiControllerBase;
class GroupController extends ApiControllerBase {
public functi... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/app/application/controllers/Index.php | examples/web-chat-system/app/application/controllers/Index.php | <?php
use \minions\http\ApiControllerBase;
use \minions\http\ApiResponse;
use \minions\base\Code;
class IndexController extends ApiControllerBase {
public function indexAction(){
// forward to admin module to login
(new ApiResponse(Code::FAIL_ACTION_NOT_REACHABLE, null))->flush();
return ... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/src/bootstrap.php | examples/web-chat-system/src/bootstrap.php | <?php
if(!defined('MINIONS_ROOT')){
define('MINIONS_ROOT', __DIR__);
spl_autoload_register(function($class){
if(substr($class,0,7) === 'minions'){
$file = MINIONS_ROOT. '/' .str_replace('\\', '/', $class) . '.php';
if(file_exists($file)){
require_once $file;
... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/src/minions/util/CurlUtil.php | examples/web-chat-system/src/minions/util/CurlUtil.php | <?php
namespace minions\util;
abstract class CurlUtil {
public static function runCurl($url, $opts, &$info) {
$ch = curl_init($url);
curl_setopt_array($ch, $opts);
$result = curl_exec($ch);
$info = curl_getinfo($ch);
curl_close($ch);
return $result;
}
pu... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/src/minions/util/JegarnUtil.php | examples/web-chat-system/src/minions/util/JegarnUtil.php | <?php
namespace minions\util;
use jegarn\manager\ChatroomManager;
use jegarn\manager\GroupManager;
use jegarn\manager\UserManager;
use jegarn\packet\FriendAgreeNotification;
use jegarn\packet\FriendRefusedNotification;
use jegarn\packet\FriendRequestNotification;
use jegarn\packet\GroupAgreeNotification;
use jegarn\pa... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/src/minions/util/FileUtil.php | examples/web-chat-system/src/minions/util/FileUtil.php | <?php
namespace minions\util;
abstract class FileUtil {
public static function createDir($path, $mode = 0777, $touch = true, $deep = 3) {
if ($path && !file_exists($path)) {
$dirs = explode(DIRECTORY_SEPARATOR, trim($path,DIRECTORY_SEPARATOR));
$count = count($dirs);
... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/src/minions/util/ConvertUtil.php | examples/web-chat-system/src/minions/util/ConvertUtil.php | <?php
namespace minions\util;
abstract class ConvertUtil {
public static function arrayToObject($arr, $dst, $field = null){
if(null === $field){
foreach($arr as $k=>$v){
$dst->$k = $v;
}
}else{
foreach($field as $k=>$v){
$dst->$... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/src/minions/util/TextUtil.php | examples/web-chat-system/src/minions/util/TextUtil.php | <?php
namespace minions\util;
abstract class TextUtil {
public static function isEmptyString($s){
return $s === null || $s === '';
}
public static function generateGUID(){
return md5(uniqid(mt_rand(), true));
}
} | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/src/minions/base/Cacheable.php | examples/web-chat-system/src/minions/base/Cacheable.php | <?php
namespace minions\base;
/**
* Class Cacheable
* @package minions\base
* @property string $id
* @property bool $isEncode
*/
abstract class Cacheable {
protected $id;
protected $isEncode;
public function getId() {
return $this->id;
}
public function setId($id) {
$this-... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/src/minions/base/Response.php | examples/web-chat-system/src/minions/base/Response.php | <?php
namespace minions\base;
abstract class Response {
abstract public function flush();
} | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/src/minions/base/Singleton.php | examples/web-chat-system/src/minions/base/Singleton.php | <?php
namespace minions\base;
use \Exception;
class Singleton {
private static $instance;
private function __construct(){}
private function __clone() {}
/**
* @param null $class
*
* @return static
* @throws Exception
*/
public static function getInstance($class = null){... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/src/minions/base/Code.php | examples/web-chat-system/src/minions/base/Code.php | <?php
namespace minions\base;
class Code {
const SUCCESS = 0;
const FAIL_INTERNAL_NO_RESPONSE = 4000;
const FAIL_INTERNAL_NO_CODE = 4001;
const FAIL_INTERNAL_EXCEPTION = 4002;
const FAIL_INTERNAL_MULTI_SEND = 4003;
const FAIL_INTERNAL_MULTI_RESPONSE = 4004;
const FAIL_ACTION_NOT_REACHA... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/src/minions/model/RosterGroup.php | examples/web-chat-system/src/minions/model/RosterGroup.php | <?php
namespace minions\model;
use minions\util\ConvertUtil;
use minions\util\TextUtil;
class RosterGroup extends Base {
const DEFAULT_NAME = 'default';
public $id;
public $uid;
public $name;
public $rank;
function toArray() {
$dst = ConvertUtil::objectToArray($this,$dst, ['id' => ... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/src/minions/model/Base.php | examples/web-chat-system/src/minions/model/Base.php | <?php
namespace minions\model;
abstract class Base {
const DATA_BASE = 0;
const DATA_SIMPLE = 1;
const DATA_MORE = 2;
const DATA_DETAIL = 3;
const DATA_FULL = 4;
abstract function toArray();
} | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/src/minions/model/GroupMessage.php | examples/web-chat-system/src/minions/model/GroupMessage.php | <?php
namespace minions\model;
class GroupMessage extends Message{
} | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/src/minions/model/User.php | examples/web-chat-system/src/minions/model/User.php | <?php
namespace minions\model;
use minions\util\ConvertUtil;
use minions\util\JegarnUtil;
class User extends Base{
public $id;
public $username;
public $password;
public $nick;
public $avatar;
public $motto;
public $create_time;
public $token;
public $reg_ip;
const OFFLINE = ... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/src/minions/model/OfflineGroupMessage.php | examples/web-chat-system/src/minions/model/OfflineGroupMessage.php | <?php
namespace minions\model;
class OfflineGroupMessage extends Message{
} | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/src/minions/model/LoginLog.php | examples/web-chat-system/src/minions/model/LoginLog.php | <?php
namespace minions\model;
class LoginLog extends Base {
const STATUS_FAILED = 0;
const STATUS_SUCCESS = 1;
public $id;
public $uid;
public $createTime;
public $ip;
public $status;
public function __construct($uid, $status) {
$this->uid = $uid;
$this->status = $... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/src/minions/model/OfflineMessage.php | examples/web-chat-system/src/minions/model/OfflineMessage.php | <?php
namespace minions\model;
class OfflineMessage extends Message{
} | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/src/minions/model/GroupUser.php | examples/web-chat-system/src/minions/model/GroupUser.php | <?php
namespace minions\model;
use minions\util\ConvertUtil;
use minions\util\TextUtil;
class GroupUser extends Base{
const PERMISSION_NORMAL = 0;
const PERMISSION_ADMIN = 1;
const PERMISSION_ROOT = 2;
const STATUS_REQUEST = 0;
const STATUS_INVITED = 1;
const STATUS_UNSUBSCRIBE = 2;
cons... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/src/minions/model/Roster.php | examples/web-chat-system/src/minions/model/Roster.php | <?php
namespace minions\model;
use minions\util\ConvertUtil;
use minions\util\TextUtil;
class Roster extends Base {
const STATUS_REQUEST = 0;
const STATUS_RECEIVE = 1;
const STATUS_UNSUBSCRIBE = 2;
const STATUS_AGREE = 3;
const STATUS_REFUSED = 4;
const STATUS_BLACK = 5;
public $id;... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/src/minions/model/Group.php | examples/web-chat-system/src/minions/model/Group.php | <?php
namespace minions\model;
use minions\util\ConvertUtil;
use minions\util\TextUtil;
class Group extends Base{
const TYPE_GROUP = 0;
const TYPE_CHATROOM = 1;
public $id;
public $uid;
public $type;
public $name;
public $create_time;
public $description;
public $icon;
pub... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/src/minions/model/Message.php | examples/web-chat-system/src/minions/model/Message.php | <?php
namespace minions\model;
use minions\util\ConvertUtil;
class Message extends Base{
public $id;
public $from;
public $to;
public $create_time;
public $message;
public function toArray() {
return ConvertUtil::objectToArray($this,$dst, ['id', 'from', 'to', 'create_time', 'message... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/src/minions/db/Db.php | examples/web-chat-system/src/minions/db/Db.php | <?php
namespace minions\db;
use minions\base\Singleton;
use Exception;
use PDO;
class Db extends Singleton {
/* @var \PDO */
protected $pdo;
protected $config;
/**
* @param null|string $class
*
* @return \PDO|Db
* @throws Exception
*/
public static function getInstance($... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/src/minions/manager/GroupManager.php | examples/web-chat-system/src/minions/manager/GroupManager.php | <?php
namespace minions\manager;
use minions\util\ConvertUtil;
use minions\model\Group;
use minions\model\GroupUser;
use minions\http\ApiResponse;
use minions\base\Code;
use minions\db\Db;
use minions\model\User;
use minions\util\JegarnUtil;
use minions\util\TextUtil;
use PDO;
class GroupManager extends BaseManager {... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/src/minions/manager/BaseManager.php | examples/web-chat-system/src/minions/manager/BaseManager.php | <?php
/**
* model manager coding rules:
* 1. add model method, if success return new model, else return false
* 2. update model method, method name must contain primary key,
* if success return modified model, else return false
* 3. delete model method, method name must contain primary key,
* if delete succ... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/src/minions/manager/UserManager.php | examples/web-chat-system/src/minions/manager/UserManager.php | <?php
namespace minions\manager;
use minions\model\LoginLog;
use minions\http\ApiRequest;
use minions\http\ApiResponse;
use minions\base\Code;
use minions\model\User;
use minions\db\Db;
use minions\util\JegarnUtil;
use PDO;
use minions\util\ConvertUtil;
use minions\util\TextUtil;
class UserManager extends BaseManager... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/src/minions/manager/RosterManager.php | examples/web-chat-system/src/minions/manager/RosterManager.php | <?php
namespace minions\manager;
use minions\model\RosterGroup;
use minions\model\Roster;
use minions\model\User;
use minions\http\ApiResponse;
use minions\base\Code;
use minions\util\ConvertUtil;
use minions\util\JegarnUtil;
use minions\util\TextUtil;
use minions\db\Db;
use PDO;
class RosterManager extends BaseManag... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/src/minions/manager/LoginLogManager.php | examples/web-chat-system/src/minions/manager/LoginLogManager.php | <?php
namespace minions\manager;
use minions\model\LoginLog;
use minions\http\ApiRequest;
use minions\http\ApiResponse;
use minions\base\Code;
use minions\db\Db;
use PDO;
class LoginLogManager extends BaseManager {
const ADD_LOGIN_LOG = 'INSERT INTO `m_login_log`(uid,create_time,ip,status) VALUES(?,?,?,?)';
... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/src/minions/manager/RosterGroupManager.php | examples/web-chat-system/src/minions/manager/RosterGroupManager.php | <?php
namespace minions\manager;
use minions\model\RosterGroup;
use minions\model\Roster;
use minions\http\ApiResponse;
use minions\base\Code;
use minions\util\ConvertUtil;
use minions\db\Db;
use PDO;
class RosterGroupManager extends BaseManager {
const ADD_ROSTER_GROUP = 'insert into `m_roster_group`(uid... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/src/minions/manager/GroupUserManager.php | examples/web-chat-system/src/minions/manager/GroupUserManager.php | <?php
namespace minions\manager;
use minions\model\Group;
use minions\model\GroupUser;
use minions\model\User;
use minions\http\ApiResponse;
use minions\base\Code;
use minions\util\ConvertUtil;
use minions\db\Db;
use minions\util\JegarnUtil;
use PDO;
class GroupUserManager extends BaseManager {
const ADD_USER = ... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/src/minions/upload/UploadFile.php | examples/web-chat-system/src/minions/upload/UploadFile.php | <?php
namespace minions\upload;
class UploadFile {
/**
* @var UploadFile[]
*/
static private $_files;
private $_name;
private $_tempName;
private $_type;
private $_size;
private $_error;
public static function getInstanceByName($name) {
if (null === self::$_files)
... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/src/minions/upload/Uploader.php | examples/web-chat-system/src/minions/upload/Uploader.php | <?php
namespace minions\upload;
use minions\base\Code;
use minions\util\FileUtil;
abstract class Uploader {
const RULE_NONE = 0;
const RULE_DATE = 1;
const TYPE_ALL = 0;
const TYPE_IMAGE = 1;
const TYPE_ARCHIVE = 2;
const TYPE_VOICE = 3;
protected static $lastErrorCode;
public sta... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/src/minions/http/ApiPluginBase.php | examples/web-chat-system/src/minions/http/ApiPluginBase.php | <?php
namespace minions\http;
use minions\manager\UserManager;
use minions\model\User;
use minions\base\Code;
use minions\util\TextUtil;
use Yaf\Plugin_Abstract;
use Yaf\Request_Abstract;
use Yaf\Response_Abstract;
class ApiPluginBase extends Plugin_Abstract {
public function routerStartup(Request_Abstract $requ... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/src/minions/http/ApiRequest.php | examples/web-chat-system/src/minions/http/ApiRequest.php | <?php
namespace minions\http;
class ApiRequest{
public static function getRemoteIp(){
return isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : null;
}
public static function getParam($key, $default = null){
// i don't need client push js code, so encode all for prevent xss
... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/src/minions/http/ApiResponse.php | examples/web-chat-system/src/minions/http/ApiResponse.php | <?php
namespace minions\http;
use minions\base\Response;
use minions\base\Code;
class ApiResponse extends Response {
public $code;
public $response;
public function __construct($code, $response) {
$this->code = $code;
$this->response = $response;
}
public function flush() {
... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/src/minions/http/ApiException.php | examples/web-chat-system/src/minions/http/ApiException.php | <?php
namespace minions\http;
use Exception;
class ApiException extends Exception {
public function __construct($message = '', $code = 0, Exception $previous = null) {
parent::__construct($message, $code, $previous);
}
} | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/examples/web-chat-system/src/minions/http/ApiControllerBase.php | examples/web-chat-system/src/minions/http/ApiControllerBase.php | <?php
namespace minions\http;
use minions\manager\UserManager;
use minions\model\Base;
use minions\base\Code;
use \Yaf\Controller_Abstract;
use \Yaf\Dispatcher;
class ApiControllerBase extends Controller_Abstract {
/**
* @var \minions\model\User
*/
protected $user;
const OPTIONS = 'OPTIONS';
... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
yaoguais/jegarn | https://github.com/yaoguais/jegarn/blob/4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae/sdk/php/src/jegarn.php | sdk/php/src/jegarn.php | <?php
/**
* parts:
* 1. packet
* 2. util
* 3. cache
* 4. manager
* 5. server
* 6. client
*/
/********************* PACKET ***************************/
namespace jegarn\packet{
// client packet is not same sa server, so client can't insert packet into cache database directly
class Base{
const TY... | php | Apache-2.0 | 4e560c7f3f1f35ae26f6fab2aa5c662d5ba1d6ae | 2026-01-05T03:40:16.275284Z | false |
habari/habari | https://github.com/habari/habari/blob/2ff21424eac12e70c857891d96844c531e79cc60/index.php | index.php | <?php
/**
* Habari Index
*
* In this file, we just set the root dir and include system/system.php
*
* @package Habari
*/
/**
* Define the constant HABARI_PATH.
* The path to the root of this Habari installation.
*/
if ( !defined( 'HABARI_PATH' ) ) {
define( 'HABARI_PATH', dirname( __FILE__ ) );
}
/**
* Req... | php | Apache-2.0 | 2ff21424eac12e70c857891d96844c531e79cc60 | 2026-01-05T03:40:23.940991Z | false |
habari/habari | https://github.com/habari/habari/blob/2ff21424eac12e70c857891d96844c531e79cc60/test.php | test.php | <!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Welcome to OpenShift</title>
<style>
/*!
* Bootstrap v3.0.0
*
* Copyright 2013 Twitter, Inc
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-... | php | Apache-2.0 | 2ff21424eac12e70c857891d96844c531e79cc60 | 2026-01-05T03:40:23.940991Z | true |
habari/habari | https://github.com/habari/habari/blob/2ff21424eac12e70c857891d96844c531e79cc60/user/plugins/hconsole/hconsole.plugin.php | user/plugins/hconsole/hconsole.plugin.php | <?php
//namespace Habari;
class HConsole extends Plugin
{
private $code = array();
private $sql = false;
private $htmlspecial = false;
public function alias()
{
return array(
'template_footer' => array('action_admin_footer', 'action_template_footer')
);
}
/**
* Early as possible, let's define DEBUG ... | php | Apache-2.0 | 2ff21424eac12e70c857891d96844c531e79cc60 | 2026-01-05T03:40:23.940991Z | false |
nunomaduro/curryable | https://github.com/nunomaduro/curryable/blob/c3c17b3342cc3bedea5497383e159ee780e0503b/src/globals.php | src/globals.php | <?php
use NunoMaduro\Curryable\CurryProxy;
if (! \function_exists('curry')) {
/**
* Creates a new curry proxy.
*
* @param object|string|null $target A class name, a instance object, function or null (pending new this).
*
* @return CurryProxy|Closure
*/
function curry($target =... | php | MIT | c3c17b3342cc3bedea5497383e159ee780e0503b | 2026-01-05T03:40:44.436365Z | false |
nunomaduro/curryable | https://github.com/nunomaduro/curryable/blob/c3c17b3342cc3bedea5497383e159ee780e0503b/src/Curryable.php | src/Curryable.php | <?php
declare(strict_types=1);
namespace NunoMaduro\Curryable;
trait Curryable
{
/**
* Creates a new curry proxy instance from the current instance.
*/
public function curry(): CurryProxy
{
return curry($this);
}
}
| php | MIT | c3c17b3342cc3bedea5497383e159ee780e0503b | 2026-01-05T03:40:44.436365Z | false |
nunomaduro/curryable | https://github.com/nunomaduro/curryable/blob/c3c17b3342cc3bedea5497383e159ee780e0503b/src/CurryProxy.php | src/CurryProxy.php | <?php
declare(strict_types=1);
namespace NunoMaduro\Curryable;
use Closure;
/**
* @internal
*/
final class CurryProxy
{
/**
* @var object|string|null
*/
private $target;
/**
* Creates a new curry proxy.
*
* @param object|string|null $target A class name, a instance object, ... | php | MIT | c3c17b3342cc3bedea5497383e159ee780e0503b | 2026-01-05T03:40:44.436365Z | false |
nunomaduro/curryable | https://github.com/nunomaduro/curryable/blob/c3c17b3342cc3bedea5497383e159ee780e0503b/src/Adapters/Laravel/CurryableServiceProvider.php | src/Adapters/Laravel/CurryableServiceProvider.php | <?php
declare(strict_types=1);
namespace NunoMaduro\Curryable\Adapters\Laravel;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\ServiceProvider;
/**
* @internal
*/
final class CurryableServiceProvider extends ServiceProvider
{
/**
* Registers the Eloquent macro.
*/
public functi... | php | MIT | c3c17b3342cc3bedea5497383e159ee780e0503b | 2026-01-05T03:40:44.436365Z | false |
nunomaduro/curryable | https://github.com/nunomaduro/curryable/blob/c3c17b3342cc3bedea5497383e159ee780e0503b/tests/curry.php | tests/curry.php | <?php
declare(strict_types=1);
class CurryClass
{
public $publicInstanceProperty = 'publicInstanceProperty';
public static $publicStaticProperty = 'publicStaticProperty';
private $privateInstanceProperty = 'privateInstanceProperty';
private static $privateStaticProperty = 'privateStaticProperty';
... | php | MIT | c3c17b3342cc3bedea5497383e159ee780e0503b | 2026-01-05T03:40:44.436365Z | false |
nunomaduro/curryable | https://github.com/nunomaduro/curryable/blob/c3c17b3342cc3bedea5497383e159ee780e0503b/tests/curryable.php | tests/curryable.php | <?php
declare(strict_types=1);
use NunoMaduro\Curryable\Curryable;
use NunoMaduro\Curryable\CurryProxy;
class CurryableClass
{
use Curryable;
public function instanceMethod($string)
{
return $string;
}
}
it('gets an instance of curry proxy', function (): void {
$this->assertInstanceOf(C... | php | MIT | c3c17b3342cc3bedea5497383e159ee780e0503b | 2026-01-05T03:40:44.436365Z | false |
openpne/OpenPNE3 | https://github.com/openpne/OpenPNE3/blob/a7e6315688c2398b5a02de77b598b3b6dcd955bd/apps/pc_frontend/modules/community/actions/actions.class.php | apps/pc_frontend/modules/community/actions/actions.class.php | <?php
/**
* This file is part of the OpenPNE package.
* (c) OpenPNE Project (http://www.openpne.jp/)
*
* For the full copyright and license information, please view the LICENSE
* file and the NOTICE file that were distributed with this source code.
*/
/**
* community actions.
*
* @package OpenPNE
* @subp... | php | Apache-2.0 | a7e6315688c2398b5a02de77b598b3b6dcd955bd | 2026-01-05T03:40:32.642213Z | false |
openpne/OpenPNE3 | https://github.com/openpne/OpenPNE3/blob/a7e6315688c2398b5a02de77b598b3b6dcd955bd/apps/pc_frontend/modules/community/actions/components.class.php | apps/pc_frontend/modules/community/actions/components.class.php | <?php
/**
* This file is part of the OpenPNE package.
* (c) OpenPNE Project (http://www.openpne.jp/)
*
* For the full copyright and license information, please view the LICENSE
* file and the NOTICE file that were distributed with this source code.
*/
class communityComponents extends opCommunityComponents
{
... | php | Apache-2.0 | a7e6315688c2398b5a02de77b598b3b6dcd955bd | 2026-01-05T03:40:32.642213Z | false |
openpne/OpenPNE3 | https://github.com/openpne/OpenPNE3/blob/a7e6315688c2398b5a02de77b598b3b6dcd955bd/apps/pc_frontend/modules/community/templates/joinInput.php | apps/pc_frontend/modules/community/templates/joinInput.php | <?php slot('firstRow') ?>
<tr><th><?php echo __('Photo') ?></th><td><?php echo link_to(op_image_tag_sf_image($community->getImageFileName(), array('size' => '76x76')), '@community_home?id='.$id) ?> </td></tr>
<tr><th><?php echo __('%community%', array('%community%' => $op_term['community']->titleize())) ?></th><td><?ph... | php | Apache-2.0 | a7e6315688c2398b5a02de77b598b3b6dcd955bd | 2026-01-05T03:40:32.642213Z | false |
openpne/OpenPNE3 | https://github.com/openpne/OpenPNE3/blob/a7e6315688c2398b5a02de77b598b3b6dcd955bd/apps/pc_frontend/modules/community/templates/editSuccess.php | apps/pc_frontend/modules/community/templates/editSuccess.php | <?php
$options = array(
'isMultipart' => true,
);
if ($communityForm->isNew())
{
$options['title'] = __('Create a new %community%');
$options['url'] = url_for('@community_edit');
}
else
{
$options['title'] = __('Edit the %community%');
$options['url'] = url_for('@community_edit?id='.$community->getId());
}
... | php | Apache-2.0 | a7e6315688c2398b5a02de77b598b3b6dcd955bd | 2026-01-05T03:40:32.642213Z | false |
openpne/OpenPNE3 | https://github.com/openpne/OpenPNE3/blob/a7e6315688c2398b5a02de77b598b3b6dcd955bd/apps/pc_frontend/modules/community/templates/joinError.php | apps/pc_frontend/modules/community/templates/joinError.php | <?php if ($isCommunityMember): ?>
<?php $body = __('You are already joined to this %community%.') ?>
<?php else: ?>
<?php $body = __('You have already sent the participation request to this %community%.') ?>
<?php endif; ?>
<?php op_include_box('error', $body, array('title' => __('Errors'))) ?>
<?php use_helper('Jav... | php | Apache-2.0 | a7e6315688c2398b5a02de77b598b3b6dcd955bd | 2026-01-05T03:40:32.642213Z | false |
openpne/OpenPNE3 | https://github.com/openpne/OpenPNE3/blob/a7e6315688c2398b5a02de77b598b3b6dcd955bd/apps/pc_frontend/modules/community/templates/deleteSuccess.php | apps/pc_frontend/modules/community/templates/deleteSuccess.php | <?php
$form = new BaseForm();
op_include_parts('yesNo', 'deleteConfirmForm', array(
'title' => __('Do you delete this %community%?'),
'yes_form' => '<input type="hidden" name="is_delete"/>'
. '<input type="hidden" name="'.$form->getCSRFFieldName().'" value="'.$form->getCSRFToken().'"/>',
'button' =>... | php | Apache-2.0 | a7e6315688c2398b5a02de77b598b3b6dcd955bd | 2026-01-05T03:40:32.642213Z | false |
openpne/OpenPNE3 | https://github.com/openpne/OpenPNE3/blob/a7e6315688c2398b5a02de77b598b3b6dcd955bd/apps/pc_frontend/modules/community/templates/dropMemberInput.php | apps/pc_frontend/modules/community/templates/dropMemberInput.php | <?php op_include_parts('yesNo', 'dropMemberConfirmForm', array(
'body' => __('Do you drop %0% from this %community%?', array('%0%' => $member->getName())),
'yes_form' => new sfForm(),
'no_url' => url_for('@community_memberManage?id='.$community->getId()),
'no_method' => 'get',
)) ?>
| php | Apache-2.0 | a7e6315688c2398b5a02de77b598b3b6dcd955bd | 2026-01-05T03:40:32.642213Z | false |
openpne/OpenPNE3 | https://github.com/openpne/OpenPNE3/blob/a7e6315688c2398b5a02de77b598b3b6dcd955bd/apps/pc_frontend/modules/community/templates/smtJoinError.php | apps/pc_frontend/modules/community/templates/smtJoinError.php | <div class="row">
<div class="gadget_header span12"><?php echo __('Errors') ?></div>
</div>
<div class="row">
<?php if ($isCommunityMember): ?>
<?php echo __('You are already joined to this %community%.') ?>
<?php else: ?>
<?php echo __('You have already sent the participation request to this %community%.') ?>
<?ph... | php | Apache-2.0 | a7e6315688c2398b5a02de77b598b3b6dcd955bd | 2026-01-05T03:40:32.642213Z | false |
openpne/OpenPNE3 | https://github.com/openpne/OpenPNE3/blob/a7e6315688c2398b5a02de77b598b3b6dcd955bd/apps/pc_frontend/modules/community/templates/searchSuccess.php | apps/pc_frontend/modules/community/templates/searchSuccess.php | <?php
$options = array(
'title' => __('Search %community%', array('%community%' => $op_term['community']->titleize()->pluralize())),
'url' => url_for('@community_search'),
'button' => __('Search'),
'moreInfo' => array(link_to(__('Create a new %community%'), '@community_edit')),
'method' => 'get'
)... | php | Apache-2.0 | a7e6315688c2398b5a02de77b598b3b6dcd955bd | 2026-01-05T03:40:32.642213Z | false |
openpne/OpenPNE3 | https://github.com/openpne/OpenPNE3/blob/a7e6315688c2398b5a02de77b598b3b6dcd955bd/apps/pc_frontend/modules/community/templates/smtEditSuccess.php | apps/pc_frontend/modules/community/templates/smtEditSuccess.php | <?php if ($communityForm->isNew()): ?>
<?php echo form_tag(url_for('@community_edit'), 'multipart=true') ?>
<?php else: ?>
<?php echo form_tag(url_for('@community_edit?id='.$community->getId()), 'multipart=true') ?>
<?php endif; ?>
<div class="row">
<?php if ($communityForm->isNew()): ?>
<div class="gadget_header spa... | php | Apache-2.0 | a7e6315688c2398b5a02de77b598b3b6dcd955bd | 2026-01-05T03:40:32.642213Z | false |
openpne/OpenPNE3 | https://github.com/openpne/OpenPNE3/blob/a7e6315688c2398b5a02de77b598b3b6dcd955bd/apps/pc_frontend/modules/community/templates/homeSuccess.php | apps/pc_frontend/modules/community/templates/homeSuccess.php | <?php slot('op_sidemenu'); ?>
<?php
$options = array(
'object' => $community,
);
op_include_parts('memberImageBox', 'communityImageBox', $options);
?>
<?php
$options = array(
'title' => __('%community% Members', array('%community%' => $op_term['community']->titleize())),
'list' => $members,
'crownIds' => array... | php | Apache-2.0 | a7e6315688c2398b5a02de77b598b3b6dcd955bd | 2026-01-05T03:40:32.642213Z | false |
openpne/OpenPNE3 | https://github.com/openpne/OpenPNE3/blob/a7e6315688c2398b5a02de77b598b3b6dcd955bd/apps/pc_frontend/modules/community/templates/memberManageSuccess.php | apps/pc_frontend/modules/community/templates/memberManageSuccess.php | <?php slot('pager') ?>
<?php op_include_pager_navigation($pager, '@community_memberManage?page=%d&id='.$sf_params->get('id')); ?>
<?php end_slot(); ?>
<div class="parts">
<div class="partsHeading"><h3><?php echo __('Management member') ?></h3></div>
<?php include_slot('pager') ?>
<div class="item">
<table>
<tbody>
<?p... | php | Apache-2.0 | a7e6315688c2398b5a02de77b598b3b6dcd955bd | 2026-01-05T03:40:32.642213Z | false |
openpne/OpenPNE3 | https://github.com/openpne/OpenPNE3/blob/a7e6315688c2398b5a02de77b598b3b6dcd955bd/apps/pc_frontend/modules/community/templates/smtJoinlistSuccess.php | apps/pc_frontend/modules/community/templates/smtJoinlistSuccess.php | <div class="row">
<div class="gadget_header span12"><?php echo __('%community% List', array('%community%' => $op_term['community']->titleize())); ?></div>
</div>
<hr class="toumei" />
<div class="row" style="margin-left: 0px;">
<?php foreach ( $pager->getResults() as $member ): ?>
<div class="span3">
<div class="ro... | php | Apache-2.0 | a7e6315688c2398b5a02de77b598b3b6dcd955bd | 2026-01-05T03:40:32.642213Z | false |
openpne/OpenPNE3 | https://github.com/openpne/OpenPNE3/blob/a7e6315688c2398b5a02de77b598b3b6dcd955bd/apps/pc_frontend/modules/community/templates/memberListSuccess.php | apps/pc_frontend/modules/community/templates/memberListSuccess.php | <?php
$options = array(
'title' => __('%community% Members', array('%community%' => $op_term['community']->titleize())),
'list' => $pager->getResults(),
'crownIds' => $sf_data->getRaw('crownIds'),
'link_to' => '@member_profile?id=',
'pager' => $pager,
'link_to_pager' => '@community_memberList?page=%d&id='.$... | php | Apache-2.0 | a7e6315688c2398b5a02de77b598b3b6dcd955bd | 2026-01-05T03:40:32.642213Z | false |
openpne/OpenPNE3 | https://github.com/openpne/OpenPNE3/blob/a7e6315688c2398b5a02de77b598b3b6dcd955bd/apps/pc_frontend/modules/community/templates/_cautionAboutSubAdminRequest.php | apps/pc_frontend/modules/community/templates/_cautionAboutSubAdminRequest.php | <?php if ($communityCount): ?>
<p class="caution">
<?php echo __('You\'ve gotten %1% %community% sub-administrator requests', array('%1%' => $communityCount)) ?>
<?php echo link_to(__('Go to Confirmation Page'), '@confirmation_list?category=community_sub_admin_request') ?>
</p>
<?php endif; ?>
| php | Apache-2.0 | a7e6315688c2398b5a02de77b598b3b6dcd955bd | 2026-01-05T03:40:32.642213Z | false |
openpne/OpenPNE3 | https://github.com/openpne/OpenPNE3/blob/a7e6315688c2398b5a02de77b598b3b6dcd955bd/apps/pc_frontend/modules/community/templates/subAdminRequestInput.php | apps/pc_frontend/modules/community/templates/subAdminRequestInput.php | <?php slot('firstRow') ?>
<tr><th><?php echo __('Photo') ?></th><td><?php echo op_link_to_member($member, array('link_target' => op_image_tag_sf_image($member->getImageFileName(), array('size' => '76x76')))) ?> </td></tr>
<tr><th><?php echo __('%nickname%', array('%nickname%' => $op_term['nickname']->titleize())) ?></t... | php | Apache-2.0 | a7e6315688c2398b5a02de77b598b3b6dcd955bd | 2026-01-05T03:40:32.642213Z | false |
openpne/OpenPNE3 | https://github.com/openpne/OpenPNE3/blob/a7e6315688c2398b5a02de77b598b3b6dcd955bd/apps/pc_frontend/modules/community/templates/smtMemberListSuccess.php | apps/pc_frontend/modules/community/templates/smtMemberListSuccess.php | <div class="row">
<div class="gadget_header span12"><?php echo __('%community% List', array('%community%' => $op_term['community']->titleize())); ?></div>
</div>
<hr class="toumei" />
<div class="row" style="margin-left: 0px;">
<?php foreach ( $pager->getResults() as $member ): ?>
<div class="span3">
<div class="ro... | php | Apache-2.0 | a7e6315688c2398b5a02de77b598b3b6dcd955bd | 2026-01-05T03:40:32.642213Z | false |
openpne/OpenPNE3 | https://github.com/openpne/OpenPNE3/blob/a7e6315688c2398b5a02de77b598b3b6dcd955bd/apps/pc_frontend/modules/community/templates/_smtCommunityMemberJoinListBox.php | apps/pc_frontend/modules/community/templates/_smtCommunityMemberJoinListBox.php | <?php use_helper('Javascript') ?>
<script id="communityMemberJoinListTemplate" type="text/x-jquery-tmpl">
<div class="span3">
<div class="row_memberimg row"><div class="span3 center"><a href="${profile_url}"><img src="${profile_image}" class="rad10" width="57" height="57"></a></div></div>
<div class="row_memb... | php | Apache-2.0 | a7e6315688c2398b5a02de77b598b3b6dcd955bd | 2026-01-05T03:40:32.642213Z | false |
openpne/OpenPNE3 | https://github.com/openpne/OpenPNE3/blob/a7e6315688c2398b5a02de77b598b3b6dcd955bd/apps/pc_frontend/modules/community/templates/quitError.php | apps/pc_frontend/modules/community/templates/quitError.php | <?php if ($isAdmin): ?>
<?php $body = __('The administrator doesn\'t leave the %community%.') ?>
<?php else: ?>
<?php $body = __('You haven\'t joined this %community% yet.') ?>
<?php endif; ?>
<?php op_include_box('error', $body, array('title' => __('Errors'))) ?>
<?php use_helper('Javascript') ?>
<?php op_include_l... | php | Apache-2.0 | a7e6315688c2398b5a02de77b598b3b6dcd955bd | 2026-01-05T03:40:32.642213Z | false |
openpne/OpenPNE3 | https://github.com/openpne/OpenPNE3/blob/a7e6315688c2398b5a02de77b598b3b6dcd955bd/apps/pc_frontend/modules/community/templates/_joinListBox.php | apps/pc_frontend/modules/community/templates/_joinListBox.php | <?php
$options = array(
'title' => __('%community% List', array('%community%' => $op_term['community']->titleize())),
'list' => $communities,
'crownIds' => $sf_data->getRaw('crownIds'),
'link_to' => '@community_home?id=',
'moreInfo' => array(link_to(sprintf('%s(%d)', __('Show all'), $member->countJoinCommunit... | php | Apache-2.0 | a7e6315688c2398b5a02de77b598b3b6dcd955bd | 2026-01-05T03:40:32.642213Z | false |
openpne/OpenPNE3 | https://github.com/openpne/OpenPNE3/blob/a7e6315688c2398b5a02de77b598b3b6dcd955bd/apps/pc_frontend/modules/community/templates/smtJoinInput.php | apps/pc_frontend/modules/community/templates/smtJoinInput.php | <div class="row">
<div class="gadget_header span12"><?php echo __('Join to "%1%"', array('%1%' => $community->getName())) ?></div>
</div>
<div class="row">
<div class="span4"><?php echo link_to(op_image_tag_sf_image($community->getImageFileName(), array('size' => '48x48')), '@community_home?id='.$id) ?></div>
<d... | php | Apache-2.0 | a7e6315688c2398b5a02de77b598b3b6dcd955bd | 2026-01-05T03:40:32.642213Z | false |
openpne/OpenPNE3 | https://github.com/openpne/OpenPNE3/blob/a7e6315688c2398b5a02de77b598b3b6dcd955bd/apps/pc_frontend/modules/community/templates/_smtCautionAboutChangeAdminRequest.php | apps/pc_frontend/modules/community/templates/_smtCautionAboutChangeAdminRequest.php | <?php if ($communityCount): ?>
<hr class="toumei" />
<p class="caution">
<?php echo __('You\'ve gotten %1% %community% administrator taking over requests', array('%1%' => $communityCount)) ?>
<br />
<?php echo link_to(__('Go to Confirmation Page'), '@confirmation_list?category=community_admin_request') ?>
</p>
<?php en... | php | Apache-2.0 | a7e6315688c2398b5a02de77b598b3b6dcd955bd | 2026-01-05T03:40:32.642213Z | false |
openpne/OpenPNE3 | https://github.com/openpne/OpenPNE3/blob/a7e6315688c2398b5a02de77b598b3b6dcd955bd/apps/pc_frontend/modules/community/templates/smtSearchSuccess.php | apps/pc_frontend/modules/community/templates/smtSearchSuccess.php | <?php use_helper('Javascript') ?>
<script id="joinCommunityListTemplate" type="text/x-jquery-tmpl">
<div class="span3">
<div class="row_memberimg row"><div class="span3 center"><a href="${community_url}"><img src="${community_image_url}" class="rad10" width="57" height="57"></a></div></div>
<div class="row_me... | php | Apache-2.0 | a7e6315688c2398b5a02de77b598b3b6dcd955bd | 2026-01-05T03:40:32.642213Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.