Home
Username:
Password:
FileMaker 9 & PHP Foundations Tutorials

FileMaker's API for PHP / Reviewing Non-Command Classes




Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com’s entire library of video tutorials.


Learn More

Subtitles of the Movie

In this lesson we're going to discuss the non-command classes inside FileMaker API. With my browser, I'm going to open up the API documentation. Here we've already talked about the FileMaker base class. The FileMaker class is the foundation for using any functionality in FileMaker's API for PHP. Once you've instantiated the base FileMaker class, you can use any of the methods that are listed inside of it's class definition. In particular we talked about the command methods and how these command methods will return a specific command result object. With that command result object you can use anyone of the methods to find inside of the commands result class definition. For instance, if we did a command find any, then our result would be a FileMaker command find any object. And if we click on it's object class, we can see the methods that are associated with it. We also talked about the fact that all the command objects inherit the methods defined for the FileMaker base command class. Now let's talk about the remaining classes that are not command classes. First of all, we have the FileMaker error class. Anytime the FileMaker API for PHP has a problem executing a method, it's going to return a FileMaker error object. With that object you can perform any of the methods defined. We've discussed the FileMaker error object before and even given an example of how it's used. The FileMaker error validation object is first of all a subclass of the FileMaker error object. So it inherits all the methods defined in the FileMaker error class. Furthermore, it also has the following methods assigned to it or defined for it. The FileMaker error validation class is used whenever you want to validate a record based upon the definition inside the FileMaker defined field or managed database dialog box. You can find whether or not the data that's been set up for this record is going to violate any of the validations defined in FileMaker Pro. Now, there are some validation options in the FileMaker database which can not be validated or, in other words, this FileMaker error validation class can't use all of the validating rules in FileMaker, but it can use some of them. The FileMaker field class tells us about the different FileMaker fields that we're working with. So in other words, if we have a FileMaker field object defined out the different information about that field by using any one of these different methods. The FileMaker layout class tells us all the different things that we can do or the different methods that we have available to us if we're working with a FileMaker layout object. You don't instantiate any of these other objects by themselves. Most of the time you'll be working with a FileMaker command and a result of working with these commands, you will be given or returned one of these objects. If you're returned a field object or a layout object, then you can work with the methods defined inside of the class definition. The FileMaker record object is one you'll be working with quite often. When you perform a find or an action on a FileMaker database, you'll often return a result that will be in the form of a FileMaker record object. For instance, if you did a find on FileMaker and you got a result of a hundred records, you would probably end up with an array containing 100 FileMaker record objects. For each one of those elements in the array, you could loop through and perform some sort of action based upon the methods defined for the FileMaker record object. The FileMaker related set class is a class that is defined or set up for working with data in portals on a layout. So if you're working with a related set of records for a given record, you could end up with a related set object. And you could execute all the methods defined for the FileMaker related set. The last class defined in the API is the FileMaker result class. You'll almost always be working with the FileMaker result class because most of the execution done with the FileMaker commands returns a FileMaker result. Even when you perform a find such as we've mentioned before. If you did a find and you returned or gathered or found 100 records in your FileMaker database, the first thing the API is going to give you is a FileMaker result set. With that result set you could perform some methods before actually working with the records, such as get the first record or get the found set count, get the records, get the related sets, maybe even get the table record count, not just the count of the found records. This finishes our discussion on working with the non-command FileMaker classes that make up the rest of the FileMaker API for PHP.

Tutorial Information

Course: FileMaker 9 & PHP Foundations
Author: Lance Hallberg
SKU: 33786
ISBN: 1-933736-99-2
Release Date: 2007-08-22
Duration: 9.5 hrs / 107 lessons
Work Files: Yes
Captions: For Online University members only
Compatibility: Vista/XP/2000, OS X, Linux
QuickTime 7, Flash 8

VTC Sign up & Benefits

  • Unlimited Access
  • 98,729 Video Tutorials (23,265 free)
  • Video Available as Flash or QuickTime
  • Over 1026 Courses
  • $30 for One Month Access
  • Multi-User Discounts Available