public static function init() { if (!self::$objectType) { throw new Exception('self::$objectType must be set before calling Zotero_DataObjects initializer'); } self::$ObjectType = ucwords(self::$objectType); self::$objectTypePlural = \Zotero\DataObjectUtilities::getObjectTypePlural(self::$objectType); self::$ObjectTypePlural = ucwords(self::$objectTypePlural); self::$idColumn = self::$objectType . "ID"; self::$table = isset(self::$_table) ? self::$_table : self::$objectTypePlural; self::$ObjectClass = "Zotero_" . self::$objectType; self::$primaryFields = array_keys(self::$primaryDataSQLParts); self::$primaryDataSQLFrom = " " . (isset(self::$_primaryDataSQLFrom) ? self::$_primaryDataSQLFrom : "FROM " . self::$table . " O") . " " . self::$primaryDataSQLWhere; }
public static function clearPrimaryDataCache() { self::$primaryDataByID = array(); self::$primaryDataByKey = array(); }