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 |
|---|---|---|---|---|---|---|---|---|
scotteh/php-dom-wrapper | https://github.com/scotteh/php-dom-wrapper/blob/79912a137a99ec51aea253a0c527b59b0b8f61fb/tests/Manipulation/DetachTest.php | tests/Manipulation/DetachTest.php | <?php
namespace DOMWrap\Tests\Manipulation;
class DetachTest extends \PHPUnit\Framework\TestCase
{
use \DOMWrap\Tests\Harness\TestTrait;
public function testDetachNode() {
$expected = '<html><body><article></article></body></html>';
$doc = $this->document('<html><article><a href="http://examp... | php | BSD-3-Clause | 79912a137a99ec51aea253a0c527b59b0b8f61fb | 2026-01-05T04:06:02.833496Z | false |
scotteh/php-dom-wrapper | https://github.com/scotteh/php-dom-wrapper/blob/79912a137a99ec51aea253a0c527b59b0b8f61fb/tests/Manipulation/AttrTest.php | tests/Manipulation/AttrTest.php | <?php
namespace DOMWrap\Tests\Manipulation;
class AttrTest extends \PHPUnit\Framework\TestCase
{
use \DOMWrap\Tests\Harness\TestTrait;
public function testGetAttrNode() {
$expected = 'example test';
$doc = $this->document('<html><div class="example test"><article><a href="http://example.org/"... | php | BSD-3-Clause | 79912a137a99ec51aea253a0c527b59b0b8f61fb | 2026-01-05T04:06:02.833496Z | false |
scotteh/php-dom-wrapper | https://github.com/scotteh/php-dom-wrapper/blob/79912a137a99ec51aea253a0c527b59b0b8f61fb/tests/Manipulation/AddClassTest.php | tests/Manipulation/AddClassTest.php | <?php
namespace DOMWrap\Tests\Manipulation;
class AddClassTest extends \PHPUnit\Framework\TestCase
{
use \DOMWrap\Tests\Harness\TestTrait;
public function testAddClassNode() {
$expected = '<html><body><div class="example test dom"><article><a href="http://example.org/">this is a test</a></article></d... | php | BSD-3-Clause | 79912a137a99ec51aea253a0c527b59b0b8f61fb | 2026-01-05T04:06:02.833496Z | false |
scotteh/php-dom-wrapper | https://github.com/scotteh/php-dom-wrapper/blob/79912a137a99ec51aea253a0c527b59b0b8f61fb/tests/Manipulation/WrapTest.php | tests/Manipulation/WrapTest.php | <?php
namespace DOMWrap\Tests\Manipulation;
class WrapTest extends \PHPUnit\Framework\TestCase
{
use \DOMWrap\Tests\Harness\TestTrait;
public function testWrapNode() {
$expected = '<html><body><em><strong><article><a href="http://example.org/">this is a test</a></article></strong></em></body></html>'... | php | BSD-3-Clause | 79912a137a99ec51aea253a0c527b59b0b8f61fb | 2026-01-05T04:06:02.833496Z | false |
aws-samples/eb-demo-php-simple-app | https://github.com/aws-samples/eb-demo-php-simple-app/blob/e0b3a8101cf9ca6a120c7831f23c91d6dc89f16b/index.php | index.php | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Simple PHP App</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="web/assets/css/bootstrap.min.css" re... | php | Apache-2.0 | e0b3a8101cf9ca6a120c7831f23c91d6dc89f16b | 2026-01-05T04:06:05.456163Z | false |
aws-samples/eb-demo-php-simple-app | https://github.com/aws-samples/eb-demo-php-simple-app/blob/e0b3a8101cf9ca6a120c7831f23c91d6dc89f16b/src/app.php | src/app.php | <?php
require __DIR__ . '/../vendor/autoload.php';
require __DIR__ . '/db-connect.php';
use Silex\Application;
use Silex\Provider\TwigServiceProvider;
use Symfony\Component\HttpFoundation\Request;
// Setup the application
$app = new Application();
$app->register(new TwigServiceProvider, array(
'twig.path' => __D... | php | Apache-2.0 | e0b3a8101cf9ca6a120c7831f23c91d6dc89f16b | 2026-01-05T04:06:05.456163Z | false |
aws-samples/eb-demo-php-simple-app | https://github.com/aws-samples/eb-demo-php-simple-app/blob/e0b3a8101cf9ca6a120c7831f23c91d6dc89f16b/src/db-connect.php | src/db-connect.php | <?php
define('DB_NAME', $_SERVER['RDS_DB_NAME']);
define('DB_USER', $_SERVER['RDS_USERNAME']);
define('DB_PASSWORD', $_SERVER['RDS_PASSWORD']);
define('DB_HOST', $_SERVER['RDS_HOSTNAME']);
define('DB_TABLE', 'urler');
?> | php | Apache-2.0 | e0b3a8101cf9ca6a120c7831f23c91d6dc89f16b | 2026-01-05T04:06:05.456163Z | false |
aws-samples/eb-demo-php-simple-app | https://github.com/aws-samples/eb-demo-php-simple-app/blob/e0b3a8101cf9ca6a120c7831f23c91d6dc89f16b/web/index.php | web/index.php | <?php
require __DIR__ . '/../src/app.php';
| php | Apache-2.0 | e0b3a8101cf9ca6a120c7831f23c91d6dc89f16b | 2026-01-05T04:06:05.456163Z | false |
jxy918/swoole-game | https://github.com/jxy918/swoole-game/blob/a5f2586f0f0082b3aef5d229ca6d7323efd0386f/app/GameServer.php | app/GameServer.php | <?php
namespace Game\App;
use Game\Core\BaseServer;
use Game\Core\GameConst;
use Game\Core\Dispatch;
use Game\Core\Packet;
/**
* websocket服务器
*/
class GameServer extends BaseServer {
/**
* 是否开启http服务监听
* @var bool
*/
protected $is_open_http = true;
/**
* 是否开启websocket监听
* @var... | php | Apache-2.0 | a5f2586f0f0082b3aef5d229ca6d7323efd0386f | 2026-01-05T04:06:25.946610Z | false |
jxy918/swoole-game | https://github.com/jxy918/swoole-game/blob/a5f2586f0f0082b3aef5d229ca6d7323efd0386f/app/tcp/TcpTest.php | app/tcp/TcpTest.php | <?php
namespace Game\App\tcp;
use Game\Core\AStrategy;
use Game\Core\Packet;
use Game\Lib\protobuf\Person;
/**
* 测试tcp逻辑处理
*/
class TcpTest extends AStrategy {
/**
* 执行方法
*/
public function exec() {
//解开protobuff数据,并输出
$data = $this->_params['data'];
$obj = new Person();... | php | Apache-2.0 | a5f2586f0f0082b3aef5d229ca6d7323efd0386f | 2026-01-05T04:06:25.946610Z | false |
jxy918/swoole-game | https://github.com/jxy918/swoole-game/blob/a5f2586f0f0082b3aef5d229ca6d7323efd0386f/app/websock/SendCard.php | app/websock/SendCard.php | <?php
namespace Game\App\websock;
use Game\Core\AStrategy;
use Game\Core\Packet;
use Game\conf\MainCmd;
use Game\conf\SubCmdSys;
/**
* 发牌信息
*/
class SendCard extends AStrategy {
/**
* 执行方法
*/
public function exec() {
//处理扣金币逻辑,暂时不处理原封不动发回去
$data = Packet::packFormat('OK', 0, $this->_p... | php | Apache-2.0 | a5f2586f0f0082b3aef5d229ca6d7323efd0386f | 2026-01-05T04:06:25.946610Z | false |
jxy918/swoole-game | https://github.com/jxy918/swoole-game/blob/a5f2586f0f0082b3aef5d229ca6d7323efd0386f/app/websock/GetSingerCard.php | app/websock/GetSingerCard.php | <?php
namespace Game\App\websock;
use Game\Core\AStrategy;
use Game\Core\Packet;
use Game\Lib\JokerPoker;
use Game\conf\MainCmd;
use Game\conf\SubCmdSys;
/**
* 翻倍处理
*/
class GetSingerCard extends AStrategy {
/**
* 执行方法
*/
public function exec() {
$card = JokerPoker::getOneCard();
$data = ... | php | Apache-2.0 | a5f2586f0f0082b3aef5d229ca6d7323efd0386f | 2026-01-05T04:06:25.946610Z | false |
jxy918/swoole-game | https://github.com/jxy918/swoole-game/blob/a5f2586f0f0082b3aef5d229ca6d7323efd0386f/app/websock/IsDouble.php | app/websock/IsDouble.php | <?php
namespace Game\App\websock;
use Game\Core\AStrategy;
use Game\Core\Packet;
use Game\Lib\JokerPoker;
use Game\conf\MainCmd;
use Game\conf\SubCmdSys;
/**
* 翻倍处理
*/
class IsDouble extends AStrategy {
/**
* 执行方法
*/
public function exec() {
$card = isset($this->_params['data']['card']) ? ... | php | Apache-2.0 | a5f2586f0f0082b3aef5d229ca6d7323efd0386f | 2026-01-05T04:06:25.946610Z | false |
jxy918/swoole-game | https://github.com/jxy918/swoole-game/blob/a5f2586f0f0082b3aef5d229ca6d7323efd0386f/app/websock/TurnCard.php | app/websock/TurnCard.php | <?php
namespace Game\App\websock;
use Game\Core\AStrategy;
use Game\Core\Packet;
use Game\Lib\JokerPoker;
use Game\conf\MainCmd;
use Game\conf\SubCmdSys;
/**
* 翻牌处理
*/
class TurnCard extends AStrategy {
/**
* 执行方法
*/
public function exec() {
$card = isset($this->_params['data']['card']) ? $this... | php | Apache-2.0 | a5f2586f0f0082b3aef5d229ca6d7323efd0386f | 2026-01-05T04:06:25.946610Z | false |
jxy918/swoole-game | https://github.com/jxy918/swoole-game/blob/a5f2586f0f0082b3aef5d229ca6d7323efd0386f/app/websock/CancelCard.php | app/websock/CancelCard.php | <?php
namespace Game\App\websock;
use Game\Core\AStrategy;
use Game\Core\Packet;
use Game\conf\MainCmd;
use Game\conf\SubCmdSys;
/**
* 取消翻倍
*/
class CancelCard extends AStrategy {
/**
* 执行方法
*/
public function exec() {
//处理扣金币逻辑,暂时不处理原封不动发回去
$data = Packet::packFormat('OK', 0, $this->... | php | Apache-2.0 | a5f2586f0f0082b3aef5d229ca6d7323efd0386f | 2026-01-05T04:06:25.946610Z | false |
jxy918/swoole-game | https://github.com/jxy918/swoole-game/blob/a5f2586f0f0082b3aef5d229ca6d7323efd0386f/app/websock/ChatMsg.php | app/websock/ChatMsg.php | <?php
namespace Game\App\websock;
use Game\Core\AStrategy;
use Game\Core\Packet;
use Game\conf\MainCmd;
use Game\conf\SubCmdSys;
/**
* 聊天消息回复
*/
class ChatMsg extends AStrategy {
/**
* 执行方法
*/
public function exec() {
//原封不动发回去
$data = Packet::packFormat('OK', 0, $this->_params['data'])... | php | Apache-2.0 | a5f2586f0f0082b3aef5d229ca6d7323efd0386f | 2026-01-05T04:06:25.946610Z | false |
jxy918/swoole-game | https://github.com/jxy918/swoole-game/blob/a5f2586f0f0082b3aef5d229ca6d7323efd0386f/app/websock/GetCard.php | app/websock/GetCard.php | <?php
namespace Game\App\websock;
use Game\Core\AStrategy;
use Game\Core\Packet;
use Game\Lib\JokerPoker;
use Game\conf\MainCmd;
use Game\conf\SubCmdSys;
/**
* 获取卡牌信息
*/
class GetCard extends AStrategy {
/**
* 执行方法
*/
public function exec() {
$data = JokerPoker::getFiveCar... | php | Apache-2.0 | a5f2586f0f0082b3aef5d229ca6d7323efd0386f | 2026-01-05T04:06:25.946610Z | false |
jxy918/swoole-game | https://github.com/jxy918/swoole-game/blob/a5f2586f0f0082b3aef5d229ca6d7323efd0386f/app/http/HttpTest.php | app/http/HttpTest.php | <?php
namespace Game\App\http;
use Game\Core\AStrategy;
use Game\Core\Packet;
use Game\conf\MainCmd;
use Game\conf\SubCmdSys;
/**
* http测试逻辑
*/
class HttpTest extends AStrategy {
/**
* 执行方法
*/
public function exec() {
//处理扣金币逻辑,暂时不处理原封不动发回去
$data['stats'] = $this->_params['serv']->s... | php | Apache-2.0 | a5f2586f0f0082b3aef5d229ca6d7323efd0386f | 2026-01-05T04:06:25.946610Z | false |
jxy918/swoole-game | https://github.com/jxy918/swoole-game/blob/a5f2586f0f0082b3aef5d229ca6d7323efd0386f/app/http/HttpTestIndex.php | app/http/HttpTestIndex.php | <?php
namespace Game\App\http;
use Game\Core\AStrategy;
/**
* http测试逻辑
*/
class HttpTestIndex extends AStrategy {
/**
* 执行方法
*/
public function exec() {
//处理扣金币逻辑,暂时不处理原封不动发回去
$data = $this->_params['param'];
return json_encode($data, true);
}
} | php | Apache-2.0 | a5f2586f0f0082b3aef5d229ca6d7323efd0386f | 2026-01-05T04:06:25.946610Z | false |
jxy918/swoole-game | https://github.com/jxy918/swoole-game/blob/a5f2586f0f0082b3aef5d229ca6d7323efd0386f/bin/run.php | bin/run.php | <?php
date_default_timezone_set('Asia/Shanghai');
header("Content-type: text/html; charset=utf-8");
use Game\Conf\Config;
use \Game\App\GameServer;
require __DIR__ .'/../vendor/autoload.php';
$config = Config::getPortConf();
GameServer::getInstance()->initServer($config)->start(); | php | Apache-2.0 | a5f2586f0f0082b3aef5d229ca6d7323efd0386f | 2026-01-05T04:06:25.946610Z | false |
jxy918/swoole-game | https://github.com/jxy918/swoole-game/blob/a5f2586f0f0082b3aef5d229ca6d7323efd0386f/lib/JokerPoker.php | lib/JokerPoker.php | <?php
namespace Game\Lib;
/**
* Joker poker 算法逻辑
* @author:jiagnxinyu
*/
class JokerPoker {
/**
* 扑克牌值列表
* @var array
*/
public static $card_value_list = array(
1=>'A',2=>'2',3=>'3',4=>'4',5=>'5',6=>'6',7=>'7',8=>'8',9=>'9',10=>'10',11=>'J',12=>'Q',13=>'K',
17=>'A',18=>'2',19=>'3',20=>'4',21=>'... | php | Apache-2.0 | a5f2586f0f0082b3aef5d229ca6d7323efd0386f | 2026-01-05T04:06:25.946610Z | false |
jxy918/swoole-game | https://github.com/jxy918/swoole-game/blob/a5f2586f0f0082b3aef5d229ca6d7323efd0386f/lib/protobuf/Person.php | lib/protobuf/Person.php | <?php
/**
* Auto generated from Person.proto at 2018-05-29 11:24:51
*/
namespace Game\Lib\protobuf;
/**
* Person message
*/
class Person extends \ProtobufMessage
{
/* Field index constants */
const NAME = 1;
const ID = 2;
const EMAIL = 3;
const MONEY = 4;
/* @var array Field descriptors */... | php | Apache-2.0 | a5f2586f0f0082b3aef5d229ca6d7323efd0386f | 2026-01-05T04:06:25.946610Z | false |
jxy918/swoole-game | https://github.com/jxy918/swoole-game/blob/a5f2586f0f0082b3aef5d229ca6d7323efd0386f/core/BaseServer.php | core/BaseServer.php | <?php
namespace Game\Core;
/**
* 游戏服务器基类,主服务器为WEBSOCKET, 同时可以开启监听TCP, HTTP等协议服务器
*
*/
abstract class BaseServer {
/**
* 单例对象
*/
private static $_instance = null;
/**
* websocket服务器对象
*/
protected $server = null;
/**
* 是否开启websocket监听
* @var bool
*/
pro... | php | Apache-2.0 | a5f2586f0f0082b3aef5d229ca6d7323efd0386f | 2026-01-05T04:06:25.946610Z | false |
jxy918/swoole-game | https://github.com/jxy918/swoole-game/blob/a5f2586f0f0082b3aef5d229ca6d7323efd0386f/core/AStrategy.php | core/AStrategy.php | <?php
namespace Game\Core;
/**
* 游戏策略静态类,规范游戏策略类,此类可以扩展每个策略公共的方法
* 每个游戏请求逻辑,都算一个游戏策略, 采用策略模式实现
* 策略支持三种协议的策略, WEBSOCKET, HTTP, TCP, 分别在app目录下
* 框架的开发也是主要分别实现每种协议逻辑,根据路由配置转发到相对应的策略里
*/
abstract class AStrategy {
/**
* 参数
*/
protected $_params = array();
/**
* 构造函数... | php | Apache-2.0 | a5f2586f0f0082b3aef5d229ca6d7323efd0386f | 2026-01-05T04:06:25.946610Z | false |
jxy918/swoole-game | https://github.com/jxy918/swoole-game/blob/a5f2586f0f0082b3aef5d229ca6d7323efd0386f/core/Packet.php | core/Packet.php | <?php
namespace Game\Core;
/**
* 解包,压缩包处理逻辑
*/
class Packet {
/**
* 根式化数据
*/
public static function packFormat($msg = "OK", $code = 0, $data = array()) {
$pack = array(
"code" => $code,
"msg" => $msg,
"data" => $data,
);
return $pack;
... | php | Apache-2.0 | a5f2586f0f0082b3aef5d229ca6d7323efd0386f | 2026-01-05T04:06:25.946610Z | false |
jxy918/swoole-game | https://github.com/jxy918/swoole-game/blob/a5f2586f0f0082b3aef5d229ca6d7323efd0386f/core/GameConst.php | core/GameConst.php | <?php
namespace Game\Core;
/**
* 游戏常量
* Class GameConst
* @package Game\Core
*/
class GameConst {
const GM_PROTOCOL_TCP = 1; //TCP协议
const GM_PROTOCOL_WEBSOCK = 2; //WEBSCOKET协议
const GM_PROTOCOL_HTTP = 3; //HTTP协议
const GM_SERVER_IP = '0,0,0,0'; //服务器IP
const GM_PROTOCOL_TCP_PORT =... | php | Apache-2.0 | a5f2586f0f0082b3aef5d229ca6d7323efd0386f | 2026-01-05T04:06:25.946610Z | false |
jxy918/swoole-game | https://github.com/jxy918/swoole-game/blob/a5f2586f0f0082b3aef5d229ca6d7323efd0386f/core/Log.php | core/Log.php | <?php
namespace Game\Core;
class Log {
/**
* 日志登录类型
* @var array
*/
protected static $level_info = array(
1 => 'INFO',
2 => 'DEBUG',
3=>'ERROR'
);
/**
* 日志等级,1表示大于等于1的等级的日志,都会显示,依次类推
* @var int
*/
protected static $level = 1;
/**
* 显... | php | Apache-2.0 | a5f2586f0f0082b3aef5d229ca6d7323efd0386f | 2026-01-05T04:06:25.946610Z | false |
jxy918/swoole-game | https://github.com/jxy918/swoole-game/blob/a5f2586f0f0082b3aef5d229ca6d7323efd0386f/core/Dispatch.php | core/Dispatch.php | <?php
namespace Game\Core;
use Game\Conf\Route;
/**
* 调度运行游戏逻辑策略,分别调度到不同协议目录里,策略模式容器
*/
class Dispatch {
/**
* 策略对象
* @var object
*/
private $_strategy = null;
/**
* 参数配置文件
* @var array
*/
private $_params = array();
/**
* 构造你要使用的策略
* Dispatch const... | php | Apache-2.0 | a5f2586f0f0082b3aef5d229ca6d7323efd0386f | 2026-01-05T04:06:25.946610Z | false |
jxy918/swoole-game | https://github.com/jxy918/swoole-game/blob/a5f2586f0f0082b3aef5d229ca6d7323efd0386f/core/RedisPool.php | core/RedisPool.php | <?php
namespace Game\Core;
/**
* redis
* Class RedisPool
* @package Game\Core
*/
class RedisPool {
protected $pool;
protected $conf;
function __construct($conf) {
$this->pool = new SplQueue;
$this->conf = $conf;
}
function put($redis) {
$this->pool->push($redis);
}
fun... | php | Apache-2.0 | a5f2586f0f0082b3aef5d229ca6d7323efd0386f | 2026-01-05T04:06:25.946610Z | false |
jxy918/swoole-game | https://github.com/jxy918/swoole-game/blob/a5f2586f0f0082b3aef5d229ca6d7323efd0386f/core/MysqlPool.php | core/MysqlPool.php | <?php
namespace Game\Core;
/**
* mysql连接池类
* Class MysqlPool
* @package Game\Core
*/
class MysqlPool {
protected $pool;
protected $conf;
function __construct($conf) {
$this->pool = new \SplQueue;
$this->conf = $conf;
}
function put($db) {
$this->pool->push($db);
}
... | php | Apache-2.0 | a5f2586f0f0082b3aef5d229ca6d7323efd0386f | 2026-01-05T04:06:25.946610Z | false |
jxy918/swoole-game | https://github.com/jxy918/swoole-game/blob/a5f2586f0f0082b3aef5d229ca6d7323efd0386f/client/tcp_client.php | client/tcp_client.php | <?php
/**
* 解包,压缩包处理逻辑
*/
class Packet {
/**
* 根式化数据
*/
public static function packFormat($msg = "OK", $code = 0, $data = array()) {
$pack = array(
"code" => $code,
"msg" => $msg,
"data" => $data,
);
return $pack;
}
/**
* 打包... | php | Apache-2.0 | a5f2586f0f0082b3aef5d229ca6d7323efd0386f | 2026-01-05T04:06:25.946610Z | false |
jxy918/swoole-game | https://github.com/jxy918/swoole-game/blob/a5f2586f0f0082b3aef5d229ca6d7323efd0386f/conf/Route.php | conf/Route.php | <?php
namespace Game\Conf;
/**
* 路由规则,key主要命令字=》array(子命令字对应策略类名)
* 每条客户端对应的请求,路由到对应的逻辑处理类上处理
*
*/
class Route {
/**
* websocket路由配置,websocke配置和tcp配置需要先去配置(MainCmd)主命令子和(SubCmdSys)子主命令字配置文件
* @var array
*/
public static $websock_map = array(
MainCmd::CMD_SYS=>array(
SubCmdSys::GET_CARD_R... | php | Apache-2.0 | a5f2586f0f0082b3aef5d229ca6d7323efd0386f | 2026-01-05T04:06:25.946610Z | false |
jxy918/swoole-game | https://github.com/jxy918/swoole-game/blob/a5f2586f0f0082b3aef5d229ca6d7323efd0386f/conf/SubCmdSys.php | conf/SubCmdSys.php | <?php
namespace Game\Conf;
/**
*子命令字定义,h5客户端也应有一份对应配置,REQ结尾一般是客户端请求过来的子命令字, RESP服务器返回给客户端处理子命令字
*/
class SubCmdSys {
const GET_CARD_REQ = 1; //获取卡牌请求,客户端使用
const GET_CARD_RESP = 2; //获取卡牌响应,服务端使用
const SEND_CARD_REQ = 3; //发送卡牌请求,客户端使用
const SEND_CARD_RESP = 4; //发送卡牌响应,服务端使用
const TURN_CARD_RE... | php | Apache-2.0 | a5f2586f0f0082b3aef5d229ca6d7323efd0386f | 2026-01-05T04:06:25.946610Z | false |
jxy918/swoole-game | https://github.com/jxy918/swoole-game/blob/a5f2586f0f0082b3aef5d229ca6d7323efd0386f/conf/Config.php | conf/Config.php | <?php
namespace Game\Conf;
use Game\Core\GameConst;
/**
* 系统配置文件, 可以通过增加方法的形式载入
*/
class Config {
/**
* 监听服务器配置,可以通过配置来设置参数
* @return mixed
*/
public static function getPortConf() {
$config = array(
array(
'port'=>array(
'socket_type' =... | php | Apache-2.0 | a5f2586f0f0082b3aef5d229ca6d7323efd0386f | 2026-01-05T04:06:25.946610Z | false |
jxy918/swoole-game | https://github.com/jxy918/swoole-game/blob/a5f2586f0f0082b3aef5d229ca6d7323efd0386f/conf/MainCmd.php | conf/MainCmd.php | <?php
namespace Game\Conf;
/**
* 主命令字定义,(可以有多个主命令字,每个主命令字对应一个子命令字)
*/
class MainCmd {
const CMD_SYS = 1; //websocket系统主命令字,(主命令字)- 客户端使用
//tcp协议子命令字,此处举例处理
const CMD_TCP_SYS = 1; //tcp协议系统主命令字,(主命令字)- 客户端使用
} ... | php | Apache-2.0 | a5f2586f0f0082b3aef5d229ca6d7323efd0386f | 2026-01-05T04:06:25.946610Z | false |
sanjabteam/baloot | https://github.com/sanjabteam/baloot/blob/d0985fe04eabe776b8e8b3268195397eabefcc78/src/BalootFakerProvider.php | src/BalootFakerProvider.php | <?php
namespace Baloot;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\File;
class BalootFakerProvider extends \Faker\Provider\Base
{
public function customImage($path, $width, $height, $prefix = '')
{
$imagePath = sha1(time().'_'.uniqid()).'.jpg';
if (! File::isDirectory($path)) ... | php | MIT | d0985fe04eabe776b8e8b3268195397eabefcc78 | 2026-01-05T04:06:49.223648Z | false |
sanjabteam/baloot | https://github.com/sanjabteam/baloot/blob/d0985fe04eabe776b8e8b3268195397eabefcc78/src/BalootServiceProvider.php | src/BalootServiceProvider.php | <?php
namespace Baloot;
use Baloot\Models\City;
use Baloot\Models\Province;
use Hekmatinasser\Verta\Verta;
use Illuminate\Database\Query\Builder;
use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\ServiceProvider;
class BalootServiceProvider extends ServiceProvider... | php | MIT | d0985fe04eabe776b8e8b3268195397eabefcc78 | 2026-01-05T04:06:49.223648Z | false |
sanjabteam/baloot | https://github.com/sanjabteam/baloot/blob/d0985fe04eabe776b8e8b3268195397eabefcc78/src/EloquentHelper.php | src/EloquentHelper.php | <?php
namespace Baloot;
use Exception;
use Hekmatinasser\Verta\Verta;
trait EloquentHelper
{
public function getAttribute($key)
{
if ($key && preg_match('/^([A-Za-z0-9_]+)_fa(|_f|_ft|_ftt)$/', $key, $matches)) {
if ($this->isDateAttribute($matches[1])) {
$attributeValue = ... | php | MIT | d0985fe04eabe776b8e8b3268195397eabefcc78 | 2026-01-05T04:06:49.223648Z | false |
sanjabteam/baloot | https://github.com/sanjabteam/baloot/blob/d0985fe04eabe776b8e8b3268195397eabefcc78/src/helpers.php | src/helpers.php | <?php
use Illuminate\Support\Arr;
if (! function_exists('en_to_fa')) {
/**
* Convert english digits to farsi.
*
* @param string $text
* @return string
*/
function en_to_fa($text)
{
$en_num = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'];
$fa_num = ['۰', '۱',... | php | MIT | d0985fe04eabe776b8e8b3268195397eabefcc78 | 2026-01-05T04:06:49.223648Z | false |
sanjabteam/baloot | https://github.com/sanjabteam/baloot/blob/d0985fe04eabe776b8e8b3268195397eabefcc78/src/BalootValidator.php | src/BalootValidator.php | <?php
namespace Baloot;
use Illuminate\Validation\Validator;
class BalootValidator extends Validator
{
public $validationMessages = [
'jdate' => ':attribute'.' تاریخ شمسی معتبر نمی باشد.',
'jdate_equal' => ':attribute'.' تاریخ شمسی برابر '.':fa-date'.' نمی باشد.',
'jdate_not_equal' => ':a... | php | MIT | d0985fe04eabe776b8e8b3268195397eabefcc78 | 2026-01-05T04:06:49.223648Z | false |
sanjabteam/baloot | https://github.com/sanjabteam/baloot/blob/d0985fe04eabe776b8e8b3268195397eabefcc78/src/Middleware/FixRequestInputs.php | src/Middleware/FixRequestInputs.php | <?php
namespace Baloot\Middleware;
use Closure;
use Illuminate\Http\UploadedFile;
class FixRequestInputs
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next... | php | MIT | d0985fe04eabe776b8e8b3268195397eabefcc78 | 2026-01-05T04:06:49.223648Z | false |
sanjabteam/baloot | https://github.com/sanjabteam/baloot/blob/d0985fe04eabe776b8e8b3268195397eabefcc78/src/Models/City.php | src/Models/City.php | <?php
namespace Baloot\Models;
use Cviebrock\EloquentSluggable\Sluggable;
use Illuminate\Database\Eloquent\Model;
/**
* @property string $name name of provice
* @property string $description description about province
* @property int $province_id province id of city
* @property-read string $slug unique slug... | php | MIT | d0985fe04eabe776b8e8b3268195397eabefcc78 | 2026-01-05T04:06:49.223648Z | false |
sanjabteam/baloot | https://github.com/sanjabteam/baloot/blob/d0985fe04eabe776b8e8b3268195397eabefcc78/src/Models/Province.php | src/Models/Province.php | <?php
namespace Baloot\Models;
use Cviebrock\EloquentSluggable\Sluggable;
use Illuminate\Database\Eloquent\Model;
/**
* @property string $name name of province
* @property string $description description about province
* @property-read string $slug unique slug based on name
*/
class Province extends Model
{... | php | MIT | d0985fe04eabe776b8e8b3268195397eabefcc78 | 2026-01-05T04:06:49.223648Z | false |
sanjabteam/baloot | https://github.com/sanjabteam/baloot/blob/d0985fe04eabe776b8e8b3268195397eabefcc78/tests/BasicTest.php | tests/BasicTest.php | <?php
namespace Baloot\Tests;
use Baloot\EloquentHelper;
use Baloot\Models\City;
use Baloot\Models\Province;
use Carbon\Carbon;
use Hekmatinasser\Verta\Verta;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Artis... | php | MIT | d0985fe04eabe776b8e8b3268195397eabefcc78 | 2026-01-05T04:06:49.223648Z | false |
sanjabteam/baloot | https://github.com/sanjabteam/baloot/blob/d0985fe04eabe776b8e8b3268195397eabefcc78/config/config.php | config/config.php | <?php
return [
/*
|--------------------------------------------------------------------------
| فعال سازی قابلیت شهر ها و استان ها
|--------------------------------------------------------------------------
*/
'geo' => true,
];
| php | MIT | d0985fe04eabe776b8e8b3268195397eabefcc78 | 2026-01-05T04:06:49.223648Z | false |
sanjabteam/baloot | https://github.com/sanjabteam/baloot/blob/d0985fe04eabe776b8e8b3268195397eabefcc78/database/seeds/CitiesTableSeeder.php | database/seeds/CitiesTableSeeder.php | <?php
namespace Baloot\Database;
use Baloot\Models\City;
use Baloot\Models\Province;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Config;
class CitiesTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
Config... | php | MIT | d0985fe04eabe776b8e8b3268195397eabefcc78 | 2026-01-05T04:06:49.223648Z | false |
sanjabteam/baloot | https://github.com/sanjabteam/baloot/blob/d0985fe04eabe776b8e8b3268195397eabefcc78/database/migrations/2014_10_11_000001_create_cities_table.php | database/migrations/2014_10_11_000001_create_cities_table.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateCitiesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('cities', functio... | php | MIT | d0985fe04eabe776b8e8b3268195397eabefcc78 | 2026-01-05T04:06:49.223648Z | false |
sanjabteam/baloot | https://github.com/sanjabteam/baloot/blob/d0985fe04eabe776b8e8b3268195397eabefcc78/database/migrations/2014_10_11_000000_create_provinces_table.php | database/migrations/2014_10_11_000000_create_provinces_table.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateProvincesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('provinces', f... | php | MIT | d0985fe04eabe776b8e8b3268195397eabefcc78 | 2026-01-05T04:06:49.223648Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/HslavichOneloginSamlBundle.php | HslavichOneloginSamlBundle.php | <?php
namespace Hslavich\OneloginSamlBundle;
use Hslavich\OneloginSamlBundle\DependencyInjection\Compiler\SecurityCompilerPass;
use Hslavich\OneloginSamlBundle\DependencyInjection\Security\Factory\SamlFactory;
use Hslavich\OneloginSamlBundle\DependencyInjection\Security\Factory\SamlUserProviderFactory;
use Symfony\Co... | php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/Event/AbstractUserEvent.php | Event/AbstractUserEvent.php | <?php
namespace Hslavich\OneloginSamlBundle\Event;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Contracts\EventDispatcher\Event;
abstract class AbstractUserEvent extends Event
{
private $user;
public function __construct(UserInterface $user)
{
$this->user = $user;
}
... | php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/Event/UserCreatedEvent.php | Event/UserCreatedEvent.php | <?php
namespace Hslavich\OneloginSamlBundle\Event;
class UserCreatedEvent extends AbstractUserEvent
{
}
| php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/Event/UserModifiedEvent.php | Event/UserModifiedEvent.php | <?php
namespace Hslavich\OneloginSamlBundle\Event;
class UserModifiedEvent extends AbstractUserEvent
{
}
| php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/Controller/SamlController.php | Controller/SamlController.php | <?php
namespace Hslavich\OneloginSamlBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Core\Security;
use Symfony\Component\HttpFoundation\Request;
class SamlController extends AbstractController
{
pr... | php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/DependencyInjection/Configuration.php | DependencyInjection/Configuration.php | <?php
namespace Hslavich\OneloginSamlBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
use function is_array;
use function is_bool;
/**
* This is the class that validates and merges configuration from your app/con... | php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/DependencyInjection/HslavichOneloginSamlExtension.php | DependencyInjection/HslavichOneloginSamlExtension.php | <?php
namespace Hslavich\OneloginSamlBundle\DependencyInjection;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
class HslavichOnelogin... | php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/DependencyInjection/Compiler/SecurityCompilerPass.php | DependencyInjection/Compiler/SecurityCompilerPass.php | <?php
namespace Hslavich\OneloginSamlBundle\DependencyInjection\Compiler;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
class SecurityCompilerPass implements CompilerPassInterf... | php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/DependencyInjection/Security/Factory/SamlUserProviderFactory.php | DependencyInjection/Security/Factory/SamlUserProviderFactory.php | <?php
namespace Hslavich\OneloginSamlBundle\DependencyInjection\Security\Factory;
use Hslavich\OneloginSamlBundle\Security\User\SamlUserProvider;
use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\UserProvider\UserProviderFactoryInterface;
use Symfony\Component\Config\Definition\Builder\NodeDefinition;
us... | php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/DependencyInjection/Security/Factory/SamlFactory.php | DependencyInjection/Security/Factory/SamlFactory.php | <?php
namespace Hslavich\OneloginSamlBundle\DependencyInjection\Security\Factory;
use Hslavich\OneloginSamlBundle\Event\UserCreatedEvent;
use Hslavich\OneloginSamlBundle\Event\UserModifiedEvent;
use Hslavich\OneloginSamlBundle\EventListener\User\UserCreatedListener;
use Hslavich\OneloginSamlBundle\EventListener\User\... | php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/Resources/config/services.php | Resources/config/services.php | <?php
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
return static function (ContainerConfigurator $container): void {
$services = $container->services();
$services->defaults()
->autowire()
->autoconfigure()
;
$services->load('Hslavich\\OneloginSamlBundle\\Secur... | php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/Tests/TestUser.php | Tests/TestUser.php | <?php
namespace Hslavich\OneloginSamlBundle\Tests;
use Symfony\Component\Security\Core\User\UserInterface;
class TestUser implements UserInterface
{
private $username;
private $password;
private $email;
private $name;
private $lastname;
private $roles;
public function __construct($userna... | php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/Tests/DependencyInjection/HslavichOneloginSamlExtensionTest.php | Tests/DependencyInjection/HslavichOneloginSamlExtensionTest.php | <?php
namespace Hslavich\OneloginSamlBundle\Tests\DependencyInjection;
use Hslavich\OneloginSamlBundle\DependencyInjection\HslavichOneloginSamlExtension;
use Hslavich\OneloginSamlBundle\HslavichOneloginSamlBundle;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\Dependen... | php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/Tests/DependencyInjection/Security/Factory/SamlFactoryTest.php | Tests/DependencyInjection/Security/Factory/SamlFactoryTest.php | <?php
namespace Hslavich\OneloginSamlBundle\Tests\DependencyInjection\Security\Factory;
use DMS\PHPUnitExtensions\ArraySubset\ArraySubsetAsserts;
use Hslavich\OneloginSamlBundle\DependencyInjection\Security\Factory\SamlFactory;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Config\Definition\Builder\ArrayNodeD... | php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/Tests/DependencyInjection/Security/Factory/SamlUserProviderFactoryTest.php | Tests/DependencyInjection/Security/Factory/SamlUserProviderFactoryTest.php | <?php
namespace Hslavich\OneloginSamlBundle\Tests\DependencyInjection\Security\Factory;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\Config\Definition\Builder\ArrayNode... | php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/Tests/Security/Http/Authenticator/SamlAuthenticatorTest.php | Tests/Security/Http/Authenticator/SamlAuthenticatorTest.php | <?php
declare(strict_types=1);
namespace Hslavich\OneloginSamlBundle\Tests\Security\Http\Authenticator;
use Doctrine\ORM\EntityManagerInterface;
use Hslavich\OneloginSamlBundle\Event\UserCreatedEvent;
use Hslavich\OneloginSamlBundle\Event\UserModifiedEvent;
use Hslavich\OneloginSamlBundle\EventListener\User\UserCrea... | php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/Tests/Security/Http/Authentication/SamlAuthenticationSuccessHandlerTest.php | Tests/Security/Http/Authentication/SamlAuthenticationSuccessHandlerTest.php | <?php
namespace Hslavich\OneloginSamlBundle\Tests\Security\Http\Authentication;
use Hslavich\OneloginSamlBundle\Security\Authentication\Token\SamlToken;
use Hslavich\OneloginSamlBundle\Security\Http\Authentication\SamlAuthenticationSuccessHandler;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpFoundation\R... | php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/Tests/Security/Authentication/Provider/SamlProviderTest.php | Tests/Security/Authentication/Provider/SamlProviderTest.php | <?php
namespace Hslavich\OneloginSamlBundle\Tests\Security\Authentication\Provider;
use Doctrine\ORM\EntityManagerInterface;
use Hslavich\OneloginSamlBundle\Event\UserCreatedEvent;
use Hslavich\OneloginSamlBundle\Event\UserModifiedEvent;
use Hslavich\OneloginSamlBundle\EventListener\User\UserCreatedListener;
use Hsla... | php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/Tests/Security/User/SamlUserFactoryTest.php | Tests/Security/User/SamlUserFactoryTest.php | <?php
namespace Hslavich\OneloginSamlBundle\Tests\Security\User;
use Hslavich\OneloginSamlBundle\Security\Authentication\Token\SamlToken;
use Hslavich\OneloginSamlBundle\Security\User\SamlUserFactory;
use Hslavich\OneloginSamlBundle\Tests\TestUser;
use PHPUnit\Framework\TestCase;
class SamlUserFactoryTest extends Te... | php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/Tests/Security/User/SamlUserProviderTest.php | Tests/Security/User/SamlUserProviderTest.php | <?php
namespace Hslavich\OneloginSamlBundle\Tests\Security\User;
use Hslavich\OneloginSamlBundle\Security\User\SamlUserProvider;
use Hslavich\OneloginSamlBundle\Tests\TestUser;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Security\Core\Exception\UnsupportedUserException;
use Symfony\Component\Security\Core\U... | php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/Tests/Security/Firewall/SamlListenerTest.php | Tests/Security/Firewall/SamlListenerTest.php | <?php
namespace Hslavich\OneloginSamlBundle\Tests\Security\Firewall;
use Hslavich\OneloginSamlBundle\Security\Authentication\Token\SamlToken;
use Hslavich\OneloginSamlBundle\Security\Firewall\SamlListener;
use OneLogin\Saml2\Auth;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpFoundation\Request;
use Symfo... | php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/EventListener/User/UserModifiedListener.php | EventListener/User/UserModifiedListener.php | <?php
namespace Hslavich\OneloginSamlBundle\EventListener\User;
use Hslavich\OneloginSamlBundle\Event\UserModifiedEvent;
class UserModifiedListener extends AbstractUserListener
{
public function __invoke(UserModifiedEvent $event)
{
$this->handleEvent($event);
}
}
| php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/EventListener/User/UserCreatedListener.php | EventListener/User/UserCreatedListener.php | <?php
namespace Hslavich\OneloginSamlBundle\EventListener\User;
use Hslavich\OneloginSamlBundle\Event\UserCreatedEvent;
class UserCreatedListener extends AbstractUserListener
{
public function __invoke(UserCreatedEvent $event)
{
$this->handleEvent($event);
}
}
| php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/EventListener/User/AbstractUserListener.php | EventListener/User/AbstractUserListener.php | <?php
namespace Hslavich\OneloginSamlBundle\EventListener\User;
use Doctrine\ORM\EntityManagerInterface;
use Hslavich\OneloginSamlBundle\Event\AbstractUserEvent;
abstract class AbstractUserListener
{
protected $entryManager;
protected $needPersist;
public function __construct(?EntityManagerInterface $en... | php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/EventListener/Security/SamlLogoutListener.php | EventListener/Security/SamlLogoutListener.php | <?php
declare(strict_types=1);
namespace Hslavich\OneloginSamlBundle\EventListener\Security;
use Hslavich\OneloginSamlBundle\Security\Http\Authenticator\Token\SamlTokenInterface;
use Symfony\Component\Security\Http\Event\LogoutEvent;
class SamlLogoutListener
{
protected $samlAuth;
public function __constru... | php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/Security/Http/Authenticator/SamlAuthenticator.php | Security/Http/Authenticator/SamlAuthenticator.php | <?php
declare(strict_types=1);
namespace Hslavich\OneloginSamlBundle\Security\Http\Authenticator;
use Hslavich\OneloginSamlBundle\Event\UserCreatedEvent;
use Hslavich\OneloginSamlBundle\Event\UserModifiedEvent;
use Hslavich\OneloginSamlBundle\Security\Http\Authenticator\Passport\Badge\SamlAttributesBadge;
use Hslavi... | php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/Security/Http/Authenticator/Passport/Badge/SamlAttributesBadge.php | Security/Http/Authenticator/Passport/Badge/SamlAttributesBadge.php | <?php declare(strict_types=1);
namespace Hslavich\OneloginSamlBundle\Security\Http\Authenticator\Passport\Badge;
use Symfony\Component\Security\Http\Authenticator\Passport\Badge\BadgeInterface;
class SamlAttributesBadge implements BadgeInterface
{
private $attributes;
public function __construct(array $attr... | php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/Security/Http/Authenticator/Token/SamlToken.php | Security/Http/Authenticator/Token/SamlToken.php | <?php
declare(strict_types=1);
namespace Hslavich\OneloginSamlBundle\Security\Http\Authenticator\Token;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Security\Http\Authenticator\Token\PostAuthenticationToken;
class SamlToken extends PostAuthenticationToken implements SamlTokenInterfa... | php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/Security/Http/Authenticator/Token/SamlTokenInterface.php | Security/Http/Authenticator/Token/SamlTokenInterface.php | <?php
namespace Hslavich\OneloginSamlBundle\Security\Http\Authenticator\Token;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
interface SamlTokenInterface extends TokenInterface
{
}
| php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/Security/Http/Authentication/SamlAuthenticationSuccessHandler.php | Security/Http/Authentication/SamlAuthenticationSuccessHandler.php | <?php
namespace Hslavich\OneloginSamlBundle\Security\Http\Authentication;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Security\Http\Authentication\DefaultAuthenticationSuccessHandler;
class SamlAuthenticationSuccessHandler extends DefaultAuthenticationSuccessHandler
{
protected function d... | php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/Security/Authentication/SamlAuthenticationSuccessHandler.php | Security/Authentication/SamlAuthenticationSuccessHandler.php | <?php
namespace Hslavich\OneloginSamlBundle\Security\Authentication;
/**
* @deprecated since 2.1
*/
class SamlAuthenticationSuccessHandler extends \Hslavich\OneloginSamlBundle\Security\Http\Authentication\SamlAuthenticationSuccessHandler
{
}
| php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/Security/Authentication/Token/SamlTokenFactoryInterface.php | Security/Authentication/Token/SamlTokenFactoryInterface.php | <?php
namespace Hslavich\OneloginSamlBundle\Security\Authentication\Token;
/**
* @deprecated since 2.1
*/
interface SamlTokenFactoryInterface
{
/**
* Creates a new SAML Token object.
*
* @param mixed $user
* @param array $attributes
* @param array $roles
*
* @return SamlTokenI... | php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/Security/Authentication/Token/SamlToken.php | Security/Authentication/Token/SamlToken.php | <?php
namespace Hslavich\OneloginSamlBundle\Security\Authentication\Token;
use Symfony\Component\Security\Core\Authentication\Token\AbstractToken;
/**
* @deprecated since 2.1
*/
class SamlToken extends AbstractToken implements SamlTokenInterface
{
public function getCredentials()
{
return null;
... | php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/Security/Authentication/Token/SamlTokenFactory.php | Security/Authentication/Token/SamlTokenFactory.php | <?php
namespace Hslavich\OneloginSamlBundle\Security\Authentication\Token;
/**
* @deprecated since 2.1
*/
class SamlTokenFactory implements SamlTokenFactoryInterface
{
/**
* @inheritdoc
*/
public function createToken($user, array $attributes, array $roles)
{
$token = new SamlToken($rol... | php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/Security/Authentication/Token/SamlTokenInterface.php | Security/Authentication/Token/SamlTokenInterface.php | <?php
namespace Hslavich\OneloginSamlBundle\Security\Authentication\Token;
/**
* @deprecated since 2.1
*/
interface SamlTokenInterface extends \Hslavich\OneloginSamlBundle\Security\Http\Authenticator\Token\SamlTokenInterface
{
}
| php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/Security/Authentication/Provider/SamlProvider.php | Security/Authentication/Provider/SamlProvider.php | <?php
namespace Hslavich\OneloginSamlBundle\Security\Authentication\Provider;
use Hslavich\OneloginSamlBundle\Event\UserCreatedEvent;
use Hslavich\OneloginSamlBundle\Event\UserModifiedEvent;
use Hslavich\OneloginSamlBundle\Security\Authentication\Token\SamlTokenFactoryInterface;
use Hslavich\OneloginSamlBundle\Securi... | php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/Security/User/LegacySamlUserFactoryInterface.php | Security/User/LegacySamlUserFactoryInterface.php | <?php
namespace Hslavich\OneloginSamlBundle\Security\User;
use Hslavich\OneloginSamlBundle\Security\Authentication\Token\SamlTokenInterface;
/**
* @deprecated since 2.1
*/
interface LegacySamlUserFactoryInterface
{
public function createUser(SamlTokenInterface $token);
}
| php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/Security/User/SamlUserFactory.php | Security/User/SamlUserFactory.php | <?php
namespace Hslavich\OneloginSamlBundle\Security\User;
use Hslavich\OneloginSamlBundle\Security\Authentication\Token\SamlTokenInterface;
use Symfony\Component\Security\Core\User\UserInterface;
class SamlUserFactory implements SamlUserFactoryInterface
{
protected $userClass;
protected $mapping;
publi... | php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/Security/User/SamlUserInterface.php | Security/User/SamlUserInterface.php | <?php
namespace Hslavich\OneloginSamlBundle\Security\User;
use Symfony\Component\Security\Core\User\UserInterface;
interface SamlUserInterface extends UserInterface
{
/**
* Set SAML attributes in user object.
*
* @param array $attributes
*/
public function setSamlAttributes(array $attribu... | php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/Security/User/SamlUserProvider.php | Security/User/SamlUserProvider.php | <?php
namespace Hslavich\OneloginSamlBundle\Security\User;
use Symfony\Component\Security\Core\Exception\UnsupportedUserException;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Security\Core\User\UserProviderInterface;
class SamlUserProvider implements UserProviderInterface
{
prot... | php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/Security/User/SamlUserFactoryInterface.php | Security/User/SamlUserFactoryInterface.php | <?php
namespace Hslavich\OneloginSamlBundle\Security\User;
use Symfony\Component\Security\Core\User\UserInterface;
interface SamlUserFactoryInterface
{
/**
* Creates a new User object.
*/
public function createUser($username, array $attributes = []): UserInterface;
}
| php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
hslavich/OneloginSamlBundle | https://github.com/hslavich/OneloginSamlBundle/blob/aee3450bd36b750a2e61b4a0ca19a09ecab7a086/Security/Firewall/SamlListener.php | Security/Firewall/SamlListener.php | <?php
namespace Hslavich\OneloginSamlBundle\Security\Firewall;
use Hslavich\OneloginSamlBundle\Security\Authentication\Token\SamlToken;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Comp... | php | MIT | aee3450bd36b750a2e61b4a0ca19a09ecab7a086 | 2026-01-05T04:06:54.658391Z | false |
petercoles/Multilingual-Country-List | https://github.com/petercoles/Multilingual-Country-List/blob/58fca0c9911be5361ec38da8252dfcf6a87db9c6/src/Maker.php | src/Maker.php | <?php
namespace PeterColes\Countries;
use Exception;
class Maker
{
protected $countries = null;
public function lookup($locale = 'en', $flip = false)
{
$this->prep($locale);
if ($flip) {
return $this->countries->flip();
}
return $this->countries;
}
... | php | MIT | 58fca0c9911be5361ec38da8252dfcf6a87db9c6 | 2026-01-05T04:07:03.135121Z | false |
petercoles/Multilingual-Country-List | https://github.com/petercoles/Multilingual-Country-List/blob/58fca0c9911be5361ec38da8252dfcf6a87db9c6/src/CountriesFacade.php | src/CountriesFacade.php | <?php
namespace PeterColes\Countries;
use Illuminate\Support\Facades\Facade;
/**
*/
class CountriesFacade extends Facade
{
/**
* Get the registered name of the component.
*
* @return string
*/
protected static function getFacadeAccessor()
{
return 'countries';
}
}
| php | MIT | 58fca0c9911be5361ec38da8252dfcf6a87db9c6 | 2026-01-05T04:07:03.135121Z | false |
petercoles/Multilingual-Country-List | https://github.com/petercoles/Multilingual-Country-List/blob/58fca0c9911be5361ec38da8252dfcf6a87db9c6/src/CountriesServiceProvider.php | src/CountriesServiceProvider.php | <?php
namespace PeterColes\Countries;
use Illuminate\Support\ServiceProvider;
class CountriesServiceProvider extends ServiceProvider
{
/**
* Register the application services.
*
* @return void
*/
public function register()
{
$this->app->singleton('countries', function() {
... | php | MIT | 58fca0c9911be5361ec38da8252dfcf6a87db9c6 | 2026-01-05T04:07:03.135121Z | false |
petercoles/Multilingual-Country-List | https://github.com/petercoles/Multilingual-Country-List/blob/58fca0c9911be5361ec38da8252dfcf6a87db9c6/tests/LocaleFileTest.php | tests/LocaleFileTest.php | <?php
use PHPUnit\Framework\TestCase;
class LocaleFileTest extends TestCase
{
protected $maker;
public function setUp(): void
{
$this->maker = new PeterColes\Countries\Maker;
}
public function testLocaleFileExists()
{
$lookup = $this->maker->lookup('fr');
$th... | php | MIT | 58fca0c9911be5361ec38da8252dfcf6a87db9c6 | 2026-01-05T04:07:03.135121Z | false |
petercoles/Multilingual-Country-List | https://github.com/petercoles/Multilingual-Country-List/blob/58fca0c9911be5361ec38da8252dfcf6a87db9c6/tests/LookupTest.php | tests/LookupTest.php | <?php
use PHPUnit\Framework\TestCase;
class LookupTest extends TestCase
{
protected $maker;
public function setUp(): void
{
$this->maker = new PeterColes\Countries\Maker;
}
public function testDefaultSettings()
{
$lookup = $this->maker->lookup();
$this->asser... | php | MIT | 58fca0c9911be5361ec38da8252dfcf6a87db9c6 | 2026-01-05T04:07:03.135121Z | false |
petercoles/Multilingual-Country-List | https://github.com/petercoles/Multilingual-Country-List/blob/58fca0c9911be5361ec38da8252dfcf6a87db9c6/tests/KeyValueTest.php | tests/KeyValueTest.php | <?php
use PHPUnit\Framework\TestCase;
class KeyValueTest extends TestCase
{
protected $maker;
public function setUp(): void
{
$this->maker = new PeterColes\Countries\Maker;
}
public function testDefaultSettings()
{
$keyValue = $this->maker->keyValue();
$this-... | php | MIT | 58fca0c9911be5361ec38da8252dfcf6a87db9c6 | 2026-01-05T04:07:03.135121Z | false |
petercoles/Multilingual-Country-List | https://github.com/petercoles/Multilingual-Country-List/blob/58fca0c9911be5361ec38da8252dfcf6a87db9c6/tests/ResultManipulationTest.php | tests/ResultManipulationTest.php | <?php
use PHPUnit\Framework\TestCase;
class ResultManipulationTest extends TestCase
{
protected $maker;
public function setUp(): void
{
$this->maker = new PeterColes\Countries\Maker;
}
public function testAddCountry()
{
$lookup = $this->maker->lookup()->put('ZZ', 'My ... | php | MIT | 58fca0c9911be5361ec38da8252dfcf6a87db9c6 | 2026-01-05T04:07:03.135121Z | false |
petercoles/Multilingual-Country-List | https://github.com/petercoles/Multilingual-Country-List/blob/58fca0c9911be5361ec38da8252dfcf6a87db9c6/tests/CountryNameTest.php | tests/CountryNameTest.php | <?php
use PHPUnit\Framework\TestCase;
class CountryNameTest extends TestCase
{
protected $maker;
public function setUp(): void
{
$this->maker = new PeterColes\Countries\Maker;
}
public function testDefaultSettings()
{
$countryName = $this->maker->countryName('BE');
... | php | MIT | 58fca0c9911be5361ec38da8252dfcf6a87db9c6 | 2026-01-05T04:07:03.135121Z | false |
petercoles/Multilingual-Country-List | https://github.com/petercoles/Multilingual-Country-List/blob/58fca0c9911be5361ec38da8252dfcf6a87db9c6/data/zh_Hant.php | data/zh_Hant.php | <?php
return [
'TT' => '千里達及托巴哥',
'TR' => '土耳其',
'TC' => '土克斯及開科斯群島',
'TM' => '土庫曼',
'BT' => '不丹',
'CF' => '中非共和國',
'CN' => '中國',
'HK' => '中國香港特別行政區',
'MO' => '中國澳門特別行政區',
'DK' => '丹麥',
'EC' => '厄瓜多',
'ER' => '厄利垂亞',
'PG' => '巴布亞紐幾內亞',
'BR' => '巴西',
'BB' => '... | php | MIT | 58fca0c9911be5361ec38da8252dfcf6a87db9c6 | 2026-01-05T04:07:03.135121Z | false |
petercoles/Multilingual-Country-List | https://github.com/petercoles/Multilingual-Country-List/blob/58fca0c9911be5361ec38da8252dfcf6a87db9c6/data/uz_AF.php | data/uz_AF.php | <?php
return [
'AX' => 'Aland orollari',
'AL' => 'Albaniya',
'US' => 'Amerika Qo‘shma Shtatlari',
'AS' => 'Amerika Samoasi',
'AD' => 'Andorra',
'AI' => 'Angilya',
'AO' => 'Angola',
'AQ' => 'Antarktida',
'AG' => 'Antigua va Barbuda',
'VI' => 'AQSH Virgin orollari',
'UM' => 'A... | php | MIT | 58fca0c9911be5361ec38da8252dfcf6a87db9c6 | 2026-01-05T04:07:03.135121Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.