protected function setSavePath($savePath) { if (!is_dir($savePath) || !is_writable($savePath)) { throw new ComponentException('Session path is not writable'); } session_save_path($savePath); return $this; }