示例#1
0
 /**
  * @covers Soliant\SimpleFM\Adapter::getLayoutname
  */
 public function testGetSetLayoutname()
 {
     $value = $this->object->setLayoutname('tab');
     $this->assertTrue($value instanceof $this->object);
     $this->assertEquals($this->object->getLayoutname(), 'tab');
 }
示例#2
0
 */
$adapter->setCallParams(array('layoutname' => 'Tasks', 'commandstring' => '-max=10&-skip=5&-findall'));
/**
 * You may also update an adapter's credentials at runtime, either by setCredentials with a new array
 */
$adapter->setCredentials(array('username' => 'someotherusername', 'password' => 'someotherpassword'));
/**
 * ...or with the setUsername and setPassword methods.
 */
$adapter->setUsername('Admin');
$adapter->setPassword('');
/**
 * There are individual getters and settes for every property (except there is no getter for the password property)
 * Experiment with the getters and setters to modify the adapter and set new queries for execution
 */
$adapter->setLayoutname('Projects');
/**
 * As already mentioned, for basic usage, you can define commands using the FileMaker XML url api syntax.
 * See /documentation/fms12_cwp_xml_en.pdf
 */
$adapter->setCommandstring('-findall');
/**
* For more fine-grained control, you can also interact with the adapter's commandarray.
* This is useful because it lets you modify existing commands on the adpater, and add new commands
* without blowing away existing command properties. For example:

   $commandarray = $adapter->getCommandarray();
   $commandarray['-max']  = 40 ;             // change -max value
   $commandarray['-skip'] = 10 ;             // add a -skip command
   $adapter->setCommandarray($commandarray); // set it back on the adapter