public static function ExtractSession($data, $singleResult = false, $SessionExtension = '', $isResult = true) { // generates an assoc array of sessions by using a defined list // of its attributes $res = DBJson::getResultObjectsByAttributes($data, Session::getDBPrimaryKey(), Session::getDBConvert(), $SessionExtension); if ($isResult) { $res = Session::decodeSession($res, false); if ($singleResult == true) { // only one object as result if (count($res) > 0) { $res = $res[0]; } } } return $res; }