当前位置: 首页>>代码示例>>PHP>>正文


PHP PhpPresentation::removeSlideByIndex方法代码示例

本文整理汇总了PHP中PhpOffice\PhpPresentation\PhpPresentation::removeSlideByIndex方法的典型用法代码示例。如果您正苦于以下问题:PHP PhpPresentation::removeSlideByIndex方法的具体用法?PHP PhpPresentation::removeSlideByIndex怎么用?PHP PhpPresentation::removeSlideByIndex使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PhpOffice\PhpPresentation\PhpPresentation的用法示例。


在下文中一共展示了PhpPresentation::removeSlideByIndex方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: loadFile

 /**
  * Load PhpPresentation Serialized file
  *
  * @param  string $pFilename
  * @return \PhpOffice\PhpPresentation\PhpPresentation
  */
 protected function loadFile($pFilename)
 {
     $this->oPhpPresentation = new PhpPresentation();
     $this->oPhpPresentation->removeSlideByIndex();
     $this->oPhpPresentation->setAllMasterSlides(array());
     $this->filename = $pFilename;
     $this->oZip = new ZipArchive();
     $this->oZip->open($this->filename);
     $docPropsCore = $this->oZip->getFromName('docProps/core.xml');
     if ($docPropsCore !== false) {
         $this->loadDocumentProperties($docPropsCore);
     }
     $docPropsCustom = $this->oZip->getFromName('docProps/custom.xml');
     if ($docPropsCustom !== false) {
         $this->loadCustomProperties($docPropsCustom);
     }
     $pptViewProps = $this->oZip->getFromName('ppt/viewProps.xml');
     if ($pptViewProps !== false) {
         $this->loadViewProperties($pptViewProps);
     }
     $pptPresentation = $this->oZip->getFromName('ppt/presentation.xml');
     if ($pptPresentation !== false) {
         $this->loadDocumentLayout($pptPresentation);
         $this->loadSlides($pptPresentation);
     }
     return $this->oPhpPresentation;
 }
开发者ID:phpoffice,项目名称:phppowerpoint,代码行数:33,代码来源:PowerPoint2007.php

示例2: loadFile

 /**
  * Load PhpPresentation Serialized file
  *
  * @param  string        $pFilename
  * @return \PhpOffice\PhpPresentation\PhpPresentation
  */
 protected function loadFile($pFilename)
 {
     $this->oPhpPresentation = new PhpPresentation();
     $this->oPhpPresentation->removeSlideByIndex();
     $this->oZip = new ZipArchive();
     $this->oZip->open($pFilename);
     $docPropsCore = $this->oZip->getFromName('docProps/core.xml');
     if ($docPropsCore !== false) {
         $this->loadDocumentProperties($docPropsCore);
     }
     $pptPresentation = $this->oZip->getFromName('ppt/presentation.xml');
     if ($pptPresentation !== false) {
         $this->loadSlides($pptPresentation);
     }
     return $this->oPhpPresentation;
 }
开发者ID:hxsam,项目名称:PHPPresentation,代码行数:22,代码来源:PowerPoint2007.php

示例3: loadFile

 /**
  * Load PhpPresentation Serialized file
  *
  * @param  string        $pFilename
  * @return \PhpOffice\PhpPresentation\PhpPresentation
  */
 protected function loadFile($pFilename)
 {
     $this->oPhpPresentation = new PhpPresentation();
     $this->oPhpPresentation->removeSlideByIndex();
     $this->oZip = new ZipArchive();
     $this->oZip->open($pFilename);
     $this->oXMLReader = new XMLReader();
     if ($this->oXMLReader->getDomFromZip($pFilename, 'meta.xml') !== false) {
         $this->loadDocumentProperties();
     }
     $this->oXMLReader = new XMLReader();
     if ($this->oXMLReader->getDomFromZip($pFilename, 'content.xml') !== false) {
         $this->loadSlides();
     }
     return $this->oPhpPresentation;
 }
开发者ID:hxsam,项目名称:PHPPresentation,代码行数:22,代码来源:ODPresentation.php

示例4: loadFile

 /**
  * Load PhpPresentation Serialized file
  *
  * @param  string        $pFilename
  * @return \PhpOffice\PhpPresentation\PhpPresentation
  */
 private function loadFile($pFilename)
 {
     $this->oPhpPresentation = new PhpPresentation();
     $this->oPhpPresentation->removeSlideByIndex();
     // Read OLE Blocks
     $this->loadOLE($pFilename);
     // Read pictures in the Pictures Stream
     $this->loadPicturesStream();
     // Read information in the Current User Stream
     $this->loadCurrentUserStream();
     // Read information in the PowerPoint Document Stream
     $this->loadPowerpointDocumentStream();
     return $this->oPhpPresentation;
 }
开发者ID:hxsam,项目名称:PHPPresentation,代码行数:20,代码来源:PowerPoint97.php

示例5: date

    echo date('H:i:s') . ' Create a shape (rich text) with list with red bullet' . EOL;
    $shape = $currentSlide->createRichTextShape();
    $shape->setHeight(100);
    $shape->setWidth(400);
    $shape->setOffsetX(100);
    $shape->setOffsetY(100);
    $shape->getActiveParagraph()->getBulletStyle()->setBulletType(Bullet::TYPE_BULLET)->setBulletColor(new Color(Color::COLOR_RED));
    $shape->createTextRun('Alpha');
    $shape->createParagraph()->createTextRun('Beta');
    $shape->createParagraph()->createTextRun('Delta');
    $shape->createParagraph()->createTextRun('Epsilon');
}
// Create new PHPPresentation object
echo date('H:i:s') . ' Create new PHPPresentation object' . EOL;
$objPHPPresentation = new PhpPresentation();
// Set properties
echo date('H:i:s') . ' Set properties' . EOL;
$oProperties = $objPHPPresentation->getDocumentProperties();
$oProperties->setCreator('PHPOffice')->setLastModifiedBy('PHPPresentation Team')->setTitle('Sample 11 Title')->setSubject('Sample 11 Subject')->setDescription('Sample 11 Description')->setKeywords('office 2007 openxml libreoffice odt php')->setCategory('Sample Category');
// Remove first slide
echo date('H:i:s') . ' Remove first slide' . EOL;
$objPHPPresentation->removeSlideByIndex(0);
fnSlideRichText($objPHPPresentation);
fnSlideRichTextLineSpacing($objPHPPresentation);
fnSlideRichTextShadow($objPHPPresentation);
fnSlideRichTextList($objPHPPresentation);
// Save file
echo write($objPHPPresentation, basename(__FILE__, '.php'), $writers);
if (!CLI) {
    include_once 'Sample_Footer.php';
}
开发者ID:phpoffice,项目名称:phppowerpoint,代码行数:31,代码来源:Sample_11_Shape.php

示例6: rebindParent

 /**
  * Re-bind parent
  *
  * @param  \PhpOffice\PhpPresentation\PhpPresentation       $parent
  * @return \PhpOffice\PhpPresentation\Slide
  */
 public function rebindParent(PhpPresentation $parent)
 {
     $this->parent->removeSlideByIndex($this->parent->getIndex($this));
     $this->parent = $parent;
     return $this;
 }
开发者ID:hxsam,项目名称:PHPPresentation,代码行数:12,代码来源:Slide.php

示例7: testRemoveSlideByIndexException

 /**
  * Test remove slide by index exception
  *
  * @expectedException Exception
  * @expectedExceptionMessage Slide index is out of bounds.
  */
 public function testRemoveSlideByIndexException()
 {
     $object = new PhpPresentation();
     $object->removeSlideByIndex(1);
 }
开发者ID:phpoffice,项目名称:phppowerpoint,代码行数:11,代码来源:PhpPresentationTest.php


注:本文中的PhpOffice\PhpPresentation\PhpPresentation::removeSlideByIndex方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。