示例#1
0
 /**
  * @covers Soliant\SimpleFM\Adapter::getCommandarray
  */
 public function testGetSetCommandarray()
 {
     $value = $this->object->setCommandstring('A=B&C=D');
     $this->assertTrue($value instanceof $this->object);
     $arr = $this->object->getCommandarray();
     $arr1 = array('A' => 'B', 'C' => 'D');
     $this->assertEquals($arr, $arr1);
 }
示例#2
0
$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

*
*/
/**
* Experiment with dumping out the command string and command array and notice that it doesn't matter
* which method you use for setting commands. They both affect the same properties of the adapter. For example: