src/CustomBundle/Controller/DefaultController.php

(开头部分) 990B

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?php

namespace CustomBundle\Controller;

use AppBundle\Controller\BaseController;
use AppBundle\Controller\DefaultController as BaseDefaultController;
use CustomBundle\Biz\Course\Service\CourseService;

class DefaultController extends BaseDefaultController
{
    public function helloAction()
    {
        $this->getCustomCourseService()->getCustomCourseById(1);
        $this->getCourseService()->getCustomCourseById(1);
        $this->getCourseService()->getCourse(1);
        return $this->render('CustomBundle:custom:index.html.twig');
        //  return $this->render('default/index.html.twig');
    }

    /**
     * 使用自己的业务
     * @return CourseService
     */
    protected function getCustomCourseService()
    {
        return $this->getBiz()->service('CustomBundle:Course:CourseService');
    }

    /**
     * @return CourseService
     */
    protected function getCourseService()
    {
        return $this->getBiz()->service('Course:CourseService');
    }
}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。