public function testGetSetTitle() { $object = new Resource(); $this->assertEquals('', $object->getTitle()); $this->assertInstanceOf('PhpOffice\\PhpProject\\Resource', $object->setTitle('AAA')); $this->assertEquals('AAA', $object->getTitle()); }
/** * * @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(); }
/** * Record "Resource Assignment" * @param Resource $oResource */ private function writeRecord75(Resource $oResource) { $this->fileContent[] = '75;' . $oResource->getIndex() . ';1;;;;;;;;;;;'; }
/** * 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')); }