當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。