示例#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 Assignment"
  * @param Resource $oResource
  */
 private function writeRecord75(Resource $oResource)
 {
     $this->fileContent[] = '75;' . $oResource->getIndex() . ';1;;;;;;;;;;;';
 }
示例#4
0
 /**
  * Node "Resource"
  * @param XMLReader $oXML
  * @param \DOMElement $domNode
  */
 private function readNodeResource(\DOMElement $domNode, Resource $oResource)
 {
     // Attributes
     $oResource->setIndex($domNode->getAttribute('id'));
     $oResource->setTitle($domNode->getAttribute('name'));
 }