Inheritance: extends Box\Spout\Writer\Common\Helper\AbstractStyleHelper
コード例 #1
0
ファイル: StyleHelperTest.php プロジェクト: cheaterBY/spout
 /**
  * @return void
  */
 public function testApplyExtraStylesIfNeededShouldDoNothingIfWrapTextAlreadyApplied()
 {
     $style = (new StyleBuilder())->setShouldWrapText()->build();
     $styleHelper = new StyleHelper($this->defaultStyle);
     $this->assertTrue($style->shouldWrapText());
     $updatedStyle = $styleHelper->applyExtraStylesIfNeeded($style, ["multi\nlines"]);
     $this->assertTrue($updatedStyle->shouldWrapText());
 }
コード例 #2
0
ファイル: FileSystemHelper.php プロジェクト: box/spout
 /**
  * Creates the "styles.xml" file under the root folder
  *
  * @param StyleHelper $styleHelper
  * @param int $numWorksheets Number of created worksheets
  * @return FileSystemHelper
  */
 public function createStylesFile($styleHelper, $numWorksheets)
 {
     $stylesXmlFileContents = $styleHelper->getStylesXMLFileContent($numWorksheets);
     $this->createFileWithContents($this->rootFolder, self::STYLES_XML_FILE_NAME, $stylesXmlFileContents);
     return $this;
 }