Overview

Namespaces

  • PHP
  • XSLTBenchmarking
    • Reports
    • RunnerConsole
    • TestsGenerator
    • TestsRunner

Classes

  • AMemoryUsageDriver
  • AProcessorDriver
  • Controlor
  • Libxslt1123phpProcessorDriver
  • Libxslt1126phpProcessorDriver
  • LinuxMemoryUsageDriver
  • MemoryUsage
  • MSXML30ProcessorDriver
  • MSXML60ProcessorDriver
  • Params
  • Processor
  • Runner
  • Sablotron103cmdProcessorDriver
  • Saxon655ProcessorDriver
  • SaxonHE9402ProcessorDriver
  • Test
  • TestRunner
  • WindowsMemoryUsageDriver
  • Xalan271ProcessorDriver
  • XmlParamsDriver
  • Xsltproc1123ProcessorDriver
  • Xsltproc1126ProcessorDriver
  • XT20051206ProcessorDriver

Interfaces

  • IParamsDriver
  • Overview
  • Namespace
  • Class
  • Tree
  • Todo
  1: <?php
  2: 
  3: /*
  4:  * XSLT Benchmarking
  5:  * @link https://github.com/masicek/XSLT-Benchmarking
  6:  * @author Viktor Mašíček <viktor@masicek.net>
  7:  * @license "New" BSD License
  8:  */
  9: 
 10: namespace XSLTBenchmarking\TestsRunner;
 11: 
 12: // @codeCoverageIgnoreStart
 13: require_once __DIR__ . '/AProcessorDriver.php';
 14: // @codeCoverageIgnoreEnd
 15: 
 16: /**
 17:  * Driver for "MSXML 6.0"
 18:  *
 19:  * @author Viktor Mašíček <viktor@masicek.net>
 20:  */
 21: class MSXML60ProcessorDriver extends AProcessorDriver
 22: {
 23: 
 24: 
 25:     /**
 26:      * Return flag, if the driver is available.
 27:      *
 28:      * @return bool
 29:      */
 30:     public function isAvailable()
 31:     {
 32:         if (PHP_OS == self::OS_WIN)
 33:         {
 34:             exec('cscript //nologo "' . __DIR__ . '\MSXMLAvailability.js" "6.0"', $output);
 35: 
 36:             if (count($output) == 0)
 37:             {
 38:                 return FALSE;
 39:             }
 40:             else
 41:             {
 42:                 $output = $output[0];
 43:                 if ($output == 'available')
 44:                 {
 45:                     return TRUE;
 46:                 }
 47:                 else
 48:                 {
 49:                     return FALSE;
 50:                 }
 51:             }
 52:         }
 53:         else
 54:         {
 55:             return FALSE;
 56:         }
 57:     }
 58: 
 59: 
 60:     /**
 61:      * Return template of command
 62:      *
 63:      * Templates substitutions:
 64:      * [XSLT] = path of XSLT template for transformation
 65:      * [INPUT] = path of input XML file
 66:      * [OUTPUT] = path of generated output XML file
 67:      * [ERROR] = path of file for eventual generated error message
 68:      * [LIBS] = path of directory containing XSLT processors (libraries, command-line program etc.)
 69:      *
 70:      * @return string
 71:      */
 72:     public function getCommandTemplate()
 73:     {
 74:         $commandTemplate = 'cscript //nologo "[PROCESSORS]\MSXML\msxml.js" "[INPUT]" "[XSLT]" "[OUTPUT]" "[ERROR]" "6.0"';
 75:         return $commandTemplate;
 76:     }
 77: 
 78: 
 79:     /**
 80:      * Full name of processor (with version)
 81:      *
 82:      * @return string
 83:      */
 84:     public function getFullName()
 85:     {
 86:         return 'MSXML 6.0';
 87:     }
 88: 
 89: 
 90:     /**
 91:      * Return name of processor kernel.
 92:      * Available kernels are const of this class with prefix "KERNEL_"
 93:      *
 94:      * Examples:
 95:      * Saxon 6.5.5 -> Saxon
 96:      * xsltproc -> libxslt
 97:      *
 98:      * @return string
 99:      */
100:     public function getKernel()
101:     {
102:         return self::KERNEL_MSXML;
103:     }
104: 
105: 
106: }
107: 
XSTL Benchmarking API documentation generated by ApiGen.
Generated using the TokenReflection library.