系统概要
酷瓜云课堂局域网版,满足局域网内课程点播需求,提供包括音视频存储管理、音视频转码处理、音视频加密处理、音视频加速播放的一站式解决方案。所有服务都本地部署,没有外部依赖,资源文件和数据库都在本地,安全可靠。
产品优势
酷瓜云课堂局域网版,基于高性能 C 扩展 Phalcon 框架,响应快速,安全可靠。音视频转码相关服务基于优秀的开源项目 ffmpeg,成熟高效。业务代码全部开放,方便二次开发。
系统功能
实现了点播、直播、专栏、问答、积分等常见功能,具体请访问系统演示
友情提示
演示站点带宽只有1M,文件全在本地存储,响应比较慢,请在本地部署系统
项目组件
- 后台框架:phalcon 3.4.5
- 前端框架:layui 2.7.6
- 全文检索:xunsearch 1.4.9
- 即时通讯:workerman 3.5.22
- 基础依赖:php7.3, mysql5.7, redis5.0
项目文档
版本信息
<?php
namespace App\Library;
class AppInfo
{
protected $name = '酷瓜云课堂';
protected $alias = 'LAN-EDU';
protected $link = '';
protected $version = '1.0.4';
public function __get($name)
{
return $this->get($name);
}
public function get($name)
{
if (isset($this->{$name})) {
return $this->{$name};
}
}
}
项目骨架
<?php
namespace Bootstrap;
use App\Providers\Annotation as AnnotationProvider;
use App\Providers\Cache as CacheProvider;
use App\Providers\Config as ConfigProvider;
use App\Providers\Cookie as CookieProvider;
use App\Providers\Crypt as CryptProvider;
use App\Providers\CsrfToken as CsrfTokenProvider;
use App\Providers\Database as DatabaseProvider;
use App\Providers\EventsManager as EventsManagerProvider;
use App\Providers\FlashSession as FlashSessionProvider;
use App\Providers\Logger as LoggerProvider;
use App\Providers\MetaData as MetaDataProvider;
use App\Providers\Provider as AppProvider;
use App\Providers\Request as RequestProvider;
use App\Providers\Response as ResponseProvider;
use App\Providers\Router as RouterProvider;
use App\Providers\Session as SessionProvider;
use App\Providers\Url as UrlProvider;
use App\Providers\View as ViewProvider;
use App\Providers\Volt as VoltProvider;
use Phalcon\Di\FactoryDefault;
use Phalcon\Loader;
use Phalcon\Mvc\Application;
class HttpKernel extends Kernel
{
public function __construct()
{
$this->di = new FactoryDefault();
$this->app = new Application();
$this->loader = new Loader();
$this->initAppEnv();
$this->initAppConfig();
$this->initAppSetting();
$this->registerLoaders();
$this->registerServices();
$this->registerModules();
$this->registerErrorHandler();
}
public function handle()
{
$this->app->setDI($this->di);
$this->app->handle()->send();
}
protected function registerLoaders()
{
$this->loader->registerNamespaces([
'App' => app_path(),
'Bootstrap' => bootstrap_path(),
]);
$this->loader->registerFiles([
vendor_path('autoload.php'),
app_path('Library/Helper.php'),
]);
$this->loader->register();
}
protected function registerServices()
{
$providers = [
ConfigProvider::class,
AnnotationProvider::class,
CacheProvider::class,
CookieProvider::class,
CryptProvider::class,
CsrfTokenProvider::class,
DatabaseProvider::class,
EventsManagerProvider::class,
FlashSessionProvider::class,
LoggerProvider::class,
MetaDataProvider::class,
RequestProvider::class,
ResponseProvider::class,
RouterProvider::class,
SessionProvider::class,
UrlProvider::class,
ViewProvider::class,
VoltProvider::class,
];
foreach ($providers as $provider) {
$service = new $provider($this->di);
$service->register();
}
}
protected function registerModules()
{
$aliases = ['api', 'home', 'admin'];
$modules = [];
foreach ($aliases as $alias) {
$moduleName = ucfirst($alias);
$modules[$alias] = [
'className' => 'App\Http\\' . $moduleName . '\Module',
'path' => app_path('Http/' . $moduleName . '/Module.php'),
];
}
$this->app->registerModules($modules);
}
protected function registerErrorHandler()
{
return new HttpErrorHandler();
}
}
依赖库包
{
"require": {
"ext-phalcon": "~3.4",
"ext-redis": "~5.0",
"ext-pdo": "*",
"ext-json": "*",
"ext-fileinfo": "*",
"ext-gd": "*",
"phalcon/incubator": "^3.4",
"guzzlehttp/guzzle": "^6.5",
"swiftmailer/swiftmailer": "^6.0",
"peppeocchi/php-cron-scheduler": "^3.0",
"yansongda/pay": "^2.9",
"tencentcloud/tencentcloud-sdk-php": "^3.0",
"qcloud/cos-sdk-v5": "^2.5",
"workerman/gateway-worker": "^3.0",
"workerman/gatewayclient": "^3.0",
"whichbrowser/parser": "^2.0",
"hightman/xunsearch": "^1.4",
"xiaochong0302/ip2region": "^1.0",
"robmorgan/phinx": "^0.12",
"overtrue/wechat": "^4.2",
"endroid/qr-code": "^3.9",
"league/commonmark": "^1.5",
"firebase/php-jwt": "^5.5",
"kkokk/poster": "^1.2",
"phpoffice/phpspreadsheet": "^1.23",
"ezyang/htmlpurifier": "^4.14"
},
"require-dev": {
"odan/phinx-migrations-generator": "^5.3",
"phalcon/ide-stubs": "^3.4"
},
"repositories": {
"packagist": {
"type": "composer",
"url": "https://mirrors.aliyun.com/composer"
}
},
"config": {
"allow-plugins": {
"easywechat-composer/easywechat-composer": true
}
}
}