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

example

  1. <?php
  2.  
  3. /**
  4.  * Modify the document properties.
  5.  *
  6.  * @category   Phpdocx
  7.  * @package    examples
  8.  * @subpackage easy
  9.  * @copyright  Copyright (c) 2009-2013 Narcea Producciones Multimedia S.L.
  10.  *              (http://www.2mdc.com)
  11.  * @license    http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
  12.  * @version    2012.12.26
  13.  * @link       http://www.phpdocx.com
  14.  * @since      File available since Release 2.2
  15.  */
  16. require_once '../../classes/CreateDocx.inc';
  17.  
  18. $docx new CreateDocx();
  19.  
  20. $paramsProperties array(
  21.     'title' => 'My title',
  22.     'subject' => 'My subject',
  23.     'creator' => 'The creator',
  24.     'keywords' => 'keyword 1, keyword 2, keyword 3',
  25.     'description' => 'The description could be much longer than this',
  26.     'category' => 'My category',
  27.     'contentStatus' => 'Draft',
  28.     'Manager' => 'The boss',
  29.     'Company' => 'My company',
  30.     'custom' => array(
  31.                             'My custom text' => array('text' => 'This is a reasonably large text')
  32.                             'My custom number' => array('number' => '4567'),
  33.                             'My custom date' => array('date' => '1962-01-27T23:00:00Z'),
  34.                             'My custom boolean' => array('boolean' => true)
  35.                             )                            
  36. );
  37. $docx->addProperties($paramsProperties);
  38.  
  39. $docx->createDocx('../docx/example_properties');

Documentation generated on Mon, 13 Jan 2014 13:44:09 +0100 by phpDocumentor 1.4.4