getText() 공개 메소드

public getText ( ) : string
리턴 string
예제 #1
0
 public function testGetSetText()
 {
     $expectedText = 'AABBCCDD';
     $object = new Comment();
     $this->assertNull($object->getText());
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\Comment', $object->setText($expectedText));
     $this->assertEquals($expectedText, $object->getText());
 }
예제 #2
0
 /**
  * Write Comment
  * @param XMLWriter $objWriter
  * @param Comment $oShape
  */
 public function writeShapeComment(XMLWriter $objWriter, Comment $oShape)
 {
     // officeooo:annotation
     $objWriter->startElement('officeooo:annotation');
     $objWriter->writeAttribute('svg:x', number_format(CommonDrawing::pixelsToCentimeters($oShape->getOffsetX()), 2, '.', '') . 'cm');
     $objWriter->writeAttribute('svg:y', number_format(CommonDrawing::pixelsToCentimeters($oShape->getOffsetY()), 2, '.', '') . 'cm');
     if ($oShape->getAuthor() instanceof Comment\Author) {
         $objWriter->writeElement('dc:creator', $oShape->getAuthor()->getName());
     }
     $objWriter->writeElement('dc:date', date('Y-m-d\\TH:i:s', $oShape->getDate()));
     $objWriter->writeElement('text:p', $oShape->getText());
     // ## officeooo:annotation
     $objWriter->endElement();
 }