示例#1
0
 public function testGetSetTitle()
 {
     $object = new Resource();
     $this->assertEquals('', $object->getTitle());
     $this->assertInstanceOf('PhpOffice\\PhpProject\\Resource', $object->setTitle('AAA'));
     $this->assertEquals('AAA', $object->getTitle());
 }
示例#2
0
 /**
  * 
  * @param XMLWriter $oXML
  * @param \PhpOffice\PhpProject\Resource $oResource
  */
 private function writeResource(XMLWriter $oXML, \PhpOffice\PhpProject\Resource $oResource)
 {
     $oXML->startElement('resource');
     $oXML->writeAttribute('id', $oResource->getIndex());
     $oXML->writeAttribute('name', $oResource->getTitle());
     $oXML->writeAttribute('function', 'Default:0');
     $oXML->writeAttribute('contacts', '');
     $oXML->writeAttribute('phone', '');
     $oXML->endElement();
 }
示例#3
0
 /**
  * Record "Resource"
  * @param Resource $oResource
  */
 private function writeRecord50(Resource $oResource)
 {
     $this->fileContent[] = '50;' . $oResource->getIndex() . ';' . $oResource->getTitle();
 }