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

Source for file run_me.php

Documentation is available at run_me.php

  1. <?php
  2.     /* vim: set expandtab tabstop=4 shiftwidth=4: */
  3.     // +----------------------------------------------------------------------+
  4.     // | PHP version 5                                                        |
  5.     // +----------------------------------------------------------------------+
  6.     // | Copyright (c) 1997-2004 The PHP Group                                |
  7.     // +----------------------------------------------------------------------+
  8.     // | This source file is subject to version 3.0 of the PHP license,       |
  9.     // | that is bundled with this package in the file LICENSE, and is        |
  10.     // | available through the world-wide-web at the following url:           |
  11.     // | http://www.php.net/license/3_0.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.     // | Authors: Claudio Bustos <cdx@users.sourceforge.net>                  |
  17.     // |          Jens Bierkandt <schtorch@users.sourceforge.net>             |
  18.     // +----------------------------------------------------------------------+
  19.     //
  20.     // $Id:
  21.     error_reporting(E_ALL|E_STRICT);
  22.     require_once ('PHP/Beautifier.php');
  23.     require_once ('PHP/Beautifier/Batch.php');
  24.     try {
  25.         $oBeaut = new PHP_Beautifier();
  26.         $oBatch = new PHP_Beautifier_Batch($oBeaut);
  27.         $oBatch->addFilter('ArrayNested');
  28.         $oBatch->addFilter('ListClassFunction');
  29.         $oBatch->addFilter('Pear',array('add_header'=>'php'));
  30.         $oBatch->setInputFile('example_*.php');
  31.         $oBatch->process();
  32.         if (php_sapi_name()=='cli'{
  33.             $oBatch->show();
  34.         else {
  35.             echo '<pre>'.$oBatch->show().'</pre>';
  36.         }
  37.     }
  38.     catch(Exception $oExp{
  39.         echo ($oExp);
  40.     }
  41. ?>

Documentation generated on Mon, 11 Mar 2019 15:37:32 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.