Ejemplo n.º 1
0
 /**
  * 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 array|FileMakerException List of layout names.
  * @throws FileMakerException
  */
 public function listLayouts()
 {
     $request = $this->execute(array('-db' => $this->getProperty('database'), '-layoutnames' => true));
     if (FileMaker::isError($request)) {
         return $request;
     }
     $parser = new FMResultSet($this);
     $result = $parser->parse($request);
     if (FileMaker::isError($result)) {
         return $result;
     }
     $list = array();
     foreach ($parser->parsedResult as $data) {
         $list[] = $data['fields']['LAYOUT_NAME'][0];
     }
     return $list;
 }
Ejemplo n.º 2
0
 /**
  *
  * @param string $xml
  * @return Result|FileMakerException
  * @throws FileMakerException
  */
 protected function _getResult($xml)
 {
     $parser = new FMResultSet($this->fm);
     $parseResult = $parser->parse($xml);
     if (FileMaker::isError($parseResult)) {
         return $parseResult;
     }
     $result = new Result($this->fm);
     $parseResult = $parser->setResult($result, $this->_recordClass);
     if (FileMaker::isError($parseResult)) {
         return $parseResult;
     }
     return $result;
 }