PHPExcel_Shared_OLE
[ class tree: PHPExcel_Shared_OLE ] [ index: PHPExcel_Shared_OLE ] [ all elements ]

Source for file File.php

Documentation is available at File.php

  1. <?php
  2. /* vim: set expandtab tabstop=4 shiftwidth=4: */
  3. // +----------------------------------------------------------------------+
  4. // | PHP Version 4                                                        |
  5. // +----------------------------------------------------------------------+
  6. // | Copyright (c) 1997-2002 The PHP Group                                |
  7. // +----------------------------------------------------------------------+
  8. // | This source file is subject to version 2.02 of the PHP license,      |
  9. // | that is bundled with this package in the file LICENSE, and is        |
  10. // | available at through the world-wide-web at                           |
  11. // | http://www.php.net/license/2_02.txt.                                 |
  12. // | If you did not receive a copy of the PHP license and are unable to   |
  13. // | obtain it through the world-wide-web, please send a note to          |
  14. // | license@php.net so we can mail you a copy immediately.               |
  15. // +----------------------------------------------------------------------+
  16. // | Author: Xavier Noguer <xnoguer@php.net>                              |
  17. // | Based on OLE::Storage_Lite by Kawai, Takanori                        |
  18. // +----------------------------------------------------------------------+
  19. //
  20. // $Id: File.php,v 1.11 2007/02/13 21:00:42 schmidt Exp $
  21.  
  22.  
  23. /**
  24. * Class for creating File PPS's for OLE containers
  25. *
  26. @author   Xavier Noguer <xnoguer@php.net>
  27. @category PHPExcel
  28. @package  PHPExcel_Shared_OLE
  29. */
  30.     {
  31.     /**
  32.     * The constructor
  33.     *
  34.     * @access public
  35.     * @param string $name The name of the file (in Unicode)
  36.     * @see OLE::Asc2Ucs()
  37.     */
  38.     public function __construct($name)
  39.     {
  40.         parent::__construct(
  41.             null,
  42.             $name,
  43.             PHPExcel_Shared_OLE::OLE_PPS_TYPE_FILE,
  44.             null,
  45.             null,
  46.             null,
  47.             null,
  48.             null,
  49.             '',
  50.             array());
  51.     }
  52.  
  53.     /**
  54.     * Initialization method. Has to be called right after OLE_PPS_File().
  55.     *
  56.     * @access public
  57.     * @return mixed true on success
  58.     */
  59.     public function init()
  60.     {
  61.         return true;
  62.     }
  63.  
  64.     /**
  65.     * Append data to PPS
  66.     *
  67.     * @access public
  68.     * @param string $data The data to append
  69.     */
  70.     public function append($data)
  71.     {
  72.         $this->_data .= $data;
  73.     }
  74.  
  75.     /**
  76.      * Returns a stream for reading this file using fread() etc.
  77.      * @return  resource  a read-only stream
  78.      */
  79.     public function getStream()
  80.     {
  81.         $this->ole->getStream($this);
  82.     }
  83. }

Documentation generated on Sun, 27 Feb 2011 16:31:31 -0800 by phpDocumentor 1.4.3