Cannot use $this in static funtion