コード例 #1
0
ファイル: Add.php プロジェクト: airmoi/filemaker
 /**
  * Add command constructor.
  *
  * @ignore
  * @param FileMaker $fm FileMaker 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.
  */
 public function __construct(FileMaker $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);
             }
         }
     }
 }
コード例 #2
0
ファイル: Edit.php プロジェクト: airmoi/filemaker
 /**
  * Edit command constructor.
  *
  * @ignore
  * @param FileMaker $fm FileMaker 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 $updatedValues 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(FileMaker $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);
             }
         }
     }
 }
コード例 #3
0
ファイル: PerformScript.php プロジェクト: airmoi/filemaker
 /**
  * PerformScript command constructor.
  *
  * @ignore
  * @param \airmoi\FileMaker\FileMaker $fm FileMaker object the command was created by.
  * @param string $layout Layout to use for script context.
  * @param string $scriptName Name of the script to run.
  * @param string $scriptParameters Any parameters to pass to the script.
  */
 public function __construct(FileMaker $fm, $layout, $scriptName, $scriptParameters = null)
 {
     parent::__construct($fm, $layout);
     $this->_script = $scriptName;
     $this->_scriptParams = $scriptParameters;
 }
コード例 #4
0
ファイル: Duplicate.php プロジェクト: airmoi/filemaker
 /**
  * Duplicate command constructor.
  *
  * @ignore
  * @param FileMaker $fm FileMaker object the command was created by.
  * @param string $layout Layout the record to duplicate is in.
  * @param string $recordId ID of the record to duplicate.
  */
 public function __construct(FileMaker $fm, $layout, $recordId)
 {
     parent::__construct($fm, $layout);
     $this->recordId = $recordId;
 }