让我说我从我的Page类中调用静态标题标题
Page::$header->title[] = configuration('Site Name', '');
我能在这个函数中用同样的方式调用吗?
class PageController {
public function index(){
Page::$header->title[] = configuration('Site Name', ''); //??
}
}
答案 0 :(得分:2)
是的,只要:
SELECT DATENAME(MM,GETDATE()) AS MONTH, COUNT(*) AS TOTAL
FROM S_SRV_REQ WITH (NOLOCK)
WHERE (dbo.fn_dstoffset(CREATED) >= '11-15-2015')
AND (dbo.fn_dstoffset(CREATED) <= DATEADD(D, 1, '3-31-2016'))
AND (INS_PRODUCT IN ('PS'))
AND [SR_AREA] IS NOT NULL
AND (SR_AREA IN ('Clinical Question'))
是一个全局函数com.docker.network.bridge.enable_ip_masquerade: true
com.docker.network.bridge.host_binding_ipv4: 0.0.0.0
类configuration()
类
Page
类静态属性PageController
初始化为具有初始化为数组的属性Page
的对象您应该能够像在原始示例中一样向其添加元素,但是我建议在PHP中避免使用$header
属性,因为它们在尝试全面地对代码进行单元测试时会引起各种麻烦