Example #1
0
 /**
  * Add command constructor.
  *
  * @ignore
  * @param FileMaker_Implementation $fm FileMaker_Implementation object the command was created by.
  * @param string $layout Layout to add a record to.
  * @param 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.
  */
 function __construct($fm, $layout, $values = array())
 {
     parent::__construct($fm, $layout);
     foreach ($values as $fieldname => $value) {
         if (!is_array($value)) {
             $this->setField($fieldname, $value, 0);
         } else {
             foreach ($value as $repetition => $repetitionValue) {
                 $this->setField($fieldname, $repetitionValue, $repetition);
             }
         }
     }
 }
Example #2
0
 /**
  * Edit command constructor.
  *
  * @ignore
  * @param FileMaker_Implementation $fm FileMaker_Implementation object the 
  *        command was created by.
  * @param string $layout Layout the record is part of.
  * @param string $recordId ID of the record to edit.
  * @param 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.
  */
 public function __construct($fm, $layout, $recordId, $updatedValues = [])
 {
     parent::__construct($fm, $layout);
     $this->recordId = $recordId;
     $this->_deleteRelated = null;
     foreach ($updatedValues as $fieldname => $value) {
         if (!is_array($value)) {
             $this->setField($fieldname, $value, 0);
         } else {
             foreach ($value as $repetition => $repetitionValue) {
                 $this->setField($fieldname, $repetitionValue, $repetition);
             }
         }
     }
 }
Example #3
0
 /**
  * Find command constructor.
  *
  * @ignore
  * @param FileMaker_Implementation $fm FileMaker_Implementation object the 
  *        command was created by.
  * @param string $layout Layout to find records in.
  */
 public function __construct($fm, $layout)
 {
     parent::__construct($fm, $layout);
 }
Example #4
0
 /**
  * Delete command constructor.
  *
  * @ignore
  * @param FileMaker_Implementation $fm FileMaker_Implementation object the 
  *        command was created by.
  * @param string $layout Layout to delete record from.
  * @param string $recordId ID of the record to delete.
  */
 public function __construct($fm, $layout, $recordId)
 {
     parent::__construct($fm, $layout);
     $this->recordId = $recordId;
 }