Class FileMaker

Description

Base FileMaker class. Defines database properties, connects to a database, and gets information about the API.

Located in /FileMaker.php (line 87)


	
			
Method Summary
static string getAPIVersion ()
static string getMinServerVersion ()
static boolean isError (mixed $variable)
FileMaker FileMaker ([string $database = NULL], [string $hostspec = NULL], [string $username = NULL], [string $password = NULL])
FileMaker_Record &createRecord (string $layout, [array $fieldValues = array()])
string getContainerData (string $url)
array getProperties ()
string getProperty (string $prop)
FileMaker_Record|FileMaker_Error &getRecordById (string $layout, integer $recordId)
FileMaker_Command_Add &newAddCommand (string $layout, [array $values = array()])
FileMaker_Command_Delete &newDeleteCommand (string $layout, integer $recordId)
FileMaker_Command_Duplicate &newDuplicateCommand (string $layout, integer $recordId)
FileMaker_Command_Edit &newEditCommand (string $layout, integer $recordId, [array $updatedValues = array()])
FileMaker_Command_PerformScript &newPerformScriptCommand (string $layout, string $scriptName, [string $scriptParameters = null])
void setLogger (Log &$logger)
void setProperty (string $prop, string $value)
Methods
static method getAPIVersion (line 116)

Returns the version of the FileMaker API for PHP.

  • return: API version.
static string getAPIVersion ()
static method getMinServerVersion (line 127)

Returns the minimum version of FileMaker Server that this API works with.

  • return: Minimum FileMaker Server version.
static string getMinServerVersion ()
static method isError (line 105)

Tests whether a variable is a FileMaker API Error.

static boolean isError (mixed $variable)
  • mixed $variable: Variable to test.
Constructor FileMaker (line 150)

FileMaker object constructor.

If you want to use the constructor without specifying all the parameters, pass in NULL for the parameters you want to omit. For example, to specify only the database name, username, and password, but omit the hostspec, call the constructor as follows:

new FileMaker('DatabaseName', NULL, 'username', 'password');

FileMaker FileMaker ([string $database = NULL], [string $hostspec = NULL], [string $username = NULL], [string $password = NULL])
  • string $database: Name of the database to connect to.
  • string $hostspec: Hostspec of web server in FileMaker Server deployment. Defaults to http://localhost, if set to NULL.
  • string $username: Account name to log into database.
  • string $password: Password for account.
createRecord (line 357)

Creates a new FileMaker_Record object.

This method does not save the new record to the database. The record is not created on the Database Server until you call this record's commit() method. You must specify a layout name, and you can optionally specify an array of field values. Individual field values can also be set in the new record object.

  • return: New Record object.
FileMaker_Record &createRecord (string $layout, [array $fieldValues = array()])
  • string $layout: Layout to create a new record for.
  • array $fieldValues: Initial values for the new record's fields.
getContainerData (line 447)

Returns the data for the specified container field.

Pass in a URL string that represents the file path for the container field contents. For example, get the image data from a container field named 'Cover Image'. For a FileMaker_Record object named $record, URL-encode the path returned by the getField() method. For example:

<IMG src="img.php?-url=<?php echo urlencode($record->getField('Cover Image')); ?>">

Then as shown below in a line from img.php, pass the URL into getContainerData() for the FileMaker object named $fm:

echo $fm->getContainerData($_GET['-url']);

  • return: Raw field data.
string getContainerData (string $url)
  • string $url: URL of the container field contents to get.
getLayout (line 384)

Returns a Layout object that describes the specified layout.

  • return: Layout or Error object.
FileMaker_Layout|FileMaker_Error &getLayout (string $layout)
  • string $layout: Name of the layout to describe.
getProperties (line 186)

Returns an associative array of property name => property value for all current properties and their current values.

This array enables PHP object introspection and debugging when necessary.

  • return: All current properties.
array getProperties ()
getProperty (line 173)

Returns the current value of a property.

  • return: Property's current value.
string getProperty (string $prop)
  • string $prop: Name of the property.
getRecordById (line 372)

Returns a single FileMaker_Record object matching the given layout and record ID, or a FileMaker_Error object, if this operation fails.

  • return: Record or Error object.
FileMaker_Record|FileMaker_Error &getRecordById (string $layout, integer $recordId)
  • string $layout: Layout that $recordId is in.
  • integer $recordId: ID of the record to get.
listDatabases (line 396)

Returns an array of databases that are available with the current server settings and the current user name and password credentials.

  • return: List of database names or an Error object.
array|FileMaker_Error listDatabases ()
listLayouts (line 420)

Returns an array of layouts from the current database that are available with the current server settings and the current user name and password credentials.

  • return: List of layout names or an Error object.
array|FileMaker_Error listLayouts ()
listScripts (line 408)

Returns an array of ScriptMaker scripts from the current database that are available with the current server settings and the current user name and password credentials.

  • return: List of script names or an Error object.
array|FileMaker_Error listScripts ()
newAddCommand (line 213)

Creates a new FileMaker_Command_Add object.

  • return: New Add command object.
FileMaker_Command_Add &newAddCommand (string $layout, [array $values = array()])
  • string $layout: Layout to add a record to.
  • array $values: Associative array of field name => value pairs. To set field repetitions, use a numerically indexed array for the value of a field, with the numeric keys corresponding to the repetition number to set.
newCompoundFindCommand (line 283)

Creates a new FileMaker_Command_CompoundFind object.

  • return: New Compound Find Set command object.
FileMaker_Command_CompoundFind &newCompoundFindCommand (string $layout)
  • string $layout: Layout to find records in.
newDeleteCommand (line 244)

Creates a new FileMaker_Command_Delete object.

  • return: New Delete command object.
FileMaker_Command_Delete &newDeleteCommand (string $layout, integer $recordId)
  • string $layout: Layout to delete record from.
  • integer $recordId: ID of the record to delete.
newDuplicateCommand (line 257)

Creates a new FileMaker_Command_Duplicate object.

  • return: New Duplicate command object.
FileMaker_Command_Duplicate &newDuplicateCommand (string $layout, integer $recordId)
  • string $layout: Layout that the record to duplicate is in.
  • integer $recordId: ID of the record to duplicate.
newEditCommand (line 231)

Creates a new FileMaker_Command_Edit object.

  • return: New Edit command object.
FileMaker_Command_Edit &newEditCommand (string $layout, integer $recordId, [array $updatedValues = array()])
  • string $layout: Layout that the record is part of.
  • integer $recordId: ID of the record to edit.
  • array $updatedValues: Associative array of field name => value pairs that contain the updated field values. To set field repetitions, use a numerically indexed array for the value of a field, with the numeric keys corresponding to the repetition number to set.
newFindAllCommand (line 322)

Creates a new FileMaker_Command_FindAll object.

  • return: New Find All command object.
FileMaker_Command_FindAll &newFindAllCommand (string $layout)
  • string $layout: Layout to find all records in.
newFindAnyCommand (line 310)

Creates a new FileMaker_Command_FindAny object.

  • return: New Find Any command object.
FileMaker_Command_FindAny &newFindAnyCommand (string $layout)
  • string $layout: Layout to find one random record from.
newFindCommand (line 269)

Creates a new FileMaker_Command_Find object.

  • return: New Find command object.
FileMaker_Command_Find &newFindCommand (string $layout)
  • string $layout: Layout to find records in.
newFindRequest (line 298)

Creates a new FileMaker_Command_FindRequest object. Add one or more Find Request objects to a FileMaker_Command_CompoundFind object, then execute the Compound Find command.

  • return: New Find Request command object.
FileMaker_Command_FindRequest &newFindRequest (string $layout)
  • string $layout: Layout to find records in.
newPerformScriptCommand (line 337)

Creates a new FileMaker_Command_PerformScript object.

  • return: New Perform Script command object.
FileMaker_Command_PerformScript &newPerformScriptCommand (string $layout, string $scriptName, [string $scriptParameters = null])
  • string $layout: Layout to use for script context.
  • string $scriptName: Name of the ScriptMaker script to run.
  • string $scriptParameters: Any parameters to pass to the script.
setLogger (line 197)

Associates a PEAR Log object with the API for logging requests and responses.

void setLogger (Log &$logger)
  • Log &$logger: PEAR Log object.
setProperty (line 161)

Sets a property to a new value for all API calls.

void setProperty (string $prop, string $value)
  • string $prop: Name of the property to set.
  • string $value: Property's new value.

Documentation generated on Tue, 22 May 2007 13:39:05 -0700 by phpDocumentor 1.3.1