mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-08-01 20:39:06 +08:00
sitemap.xml,robots.txt加入忽略列表
This commit is contained in:
parent
c85cc3382b
commit
3c2cc976b6
2
.gitignore
vendored
2
.gitignore
vendored
@ -2,4 +2,6 @@
|
||||
/vendor
|
||||
/config/config.php
|
||||
/config/xs.course.ini
|
||||
/public/robots.txt
|
||||
/public/sitemap.xml
|
||||
*KgTest*
|
||||
|
@ -1,33 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Caches;
|
||||
|
||||
use App\Repos\CourseUser as CourseUserRepo;
|
||||
|
||||
class CourseUser extends Cache
|
||||
{
|
||||
|
||||
protected $lifetime = 1 * 86400;
|
||||
|
||||
public function getLifetime()
|
||||
{
|
||||
return $this->lifetime;
|
||||
}
|
||||
|
||||
public function getKey($id = null)
|
||||
{
|
||||
return "course_user:{$id}";
|
||||
}
|
||||
|
||||
public function getContent($id = null)
|
||||
{
|
||||
list($courseId, $userId) = explode('_', $id);
|
||||
|
||||
$repo = new CourseUserRepo();
|
||||
|
||||
$courseUser = $repo->findCourseUser($courseId, $userId);
|
||||
|
||||
return $courseUser ?: null;
|
||||
}
|
||||
|
||||
}
|
@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Phalcon\Config as PhalconConfig;
|
||||
use Phalcon\Config as PhConfig;
|
||||
|
||||
class Config extends Provider
|
||||
{
|
||||
@ -15,7 +15,7 @@ class Config extends Provider
|
||||
|
||||
$options = require config_path('config.php');
|
||||
|
||||
return new PhalconConfig($options);
|
||||
return new PhConfig($options);
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user