Grima  2018-08
Whispering into Alma's ear
Classes | Functions | Variables
grima-lib.php File Reference

Go to the source code of this file.

Classes

class  Grima
 grima-lib.php - a library for running API calls in Alma More...
 
class  GrimaTask
 The base class for most "grimas". More...
 
class  GrimaTaskMessage
 A thin wrapper around a message and urgency level. More...
 
class  GrimaForm
 A holder for the user inputs to a grima, base on the XML file. More...
 
class  GrimaFormField
 Wrapper for each field in a form, keeping track of its properties. More...
 
class  AlmaObject
 Base class for objects returned from alma APIs (mostly just array access) More...
 
class  AlmaObjectWithMARC
 Methods for fields and subfields in Alma's MARCXML. More...
 
class  MARCField
 MARC fields for use in bibs and holdings. More...
 
class  MARCSubfield
 
class  Bib
 
class  HoldingsList
 class HoldingsList More...
 
class  HoldingsListEntry
 class HoldingsListEntry More...
 
class  ItemList
 class ItemList More...
 
class  Holding
 class Holding More...
 
class  Item
 class Item More...
 
class  ElectronicCollection
 class ElectronicCollection More...
 
class  ElectronicService
 class ElectronicService More...
 
class  ElectronicPortfolio
 class ElectronicPortfolio More...
 
class  Set
 class Set IN PROGRESS More...
 
class  SetMember
 class SetMember More...
 
class  Library
 class Library More...
 
class  Location
 class Location More...
 
class  AnalyticsReport
 class AnalyticsReport More...
 
class  GrimaDB
 Shared access to the database for GrimaUser and GrimaInstitution. More...
 
class  GrimaInstitution
 Interface to the GrimaDB database to retrieve API keys. More...
 
class  GrimaUser
 Interface to the GrimaDB database to check password and get institution's apikey. More...
 

Functions

 tableExists ($pdo, $table)
 

Variables

 $grima = new Grima()
 

Function Documentation

◆ tableExists()

tableExists (   $pdo,
  $table 
)

Definition at line 3113 of file grima-lib.php.

Referenced by GrimaDB\init().

3113  {
3114  $table_esc = "\"" . preg_replace( "/\"/", "\"\"", $table ) . "\"";
3115  try {
3116  $result = $pdo->query("SELECT 1 FROM $table_esc LIMIT 1");
3117  } catch (Exception $e) {
3118  // We got an exception == table not found
3119  return FALSE;
3120  }
3121  // Result is either boolean FALSE (no table found) or PDOStatement Object (table found)
3122  return $result !== FALSE;
3123 }

Variable Documentation

◆ $grima

$grima = new Grima()