我正在处理activecollab自定义模块的权限,当尝试调用静态方法的函数时收到此错误消息不知道为什么;请做帮助将是真正appericiatable ..
Parse error: parse error, expecting `T_PAAMAYIM_NEKUDOTAYIM' in D:\wamp\www\activecollab\public\activecollab\3.0.9\modules\projectcomrequest\models\Projectcomrequests.class.php on line 130
我在模型文件中做的代码是:
class Projectrequests extends DataManager {
...
....
function getPermissionValue($name){
$roles = Roles::find();
foreach($roles as $role) {
if($role->getPermissionValue($name))
return true;
else
return false;
}
static function canAccess() {
if(self::getPermissionValue('can_use_project_request')) return true;
return false;
} // canAccess
...
..
}
通过这个调用控制器:
echo Projectrequests::canAccess();