Exemplo n.º 1
0
 /**
  * Tests property functionality.
  */
 public function testProperty()
 {
     $this->object->setProperty('key_1', 'value_1');
     $this->object->setProperty('key_2', 'value_2');
     $this->assertEquals('value_1', $this->object->getProperty('key_1'));
     $this->assertCount(2, $this->object->getProperties());
 }
Exemplo n.º 2
0
 /**
  * Returns a file object.
  *
  * @param CallbackIterator $iterator
  *
  * @return ValueObject
  */
 public function currentCallback(CallbackIterator $iterator)
 {
     $clientFilename = $this->fileNames[$iterator->key()];
     $filename = $this->directory . DIRECTORY_SEPARATOR . $clientFilename;
     $fileObject = new ValueObject(file_get_contents($filename));
     $fileObject->setProperty('filename', $filename);
     $fileObject->setProperty('client_filename', $clientFilename);
     return $fileObject;
 }