当前位置: 首页>>代码示例>>PHP>>正文


PHP pts_openbenchmarking::evaluate_string_to_qualifier方法代码示例

本文整理汇总了PHP中pts_openbenchmarking::evaluate_string_to_qualifier方法的典型用法代码示例。如果您正苦于以下问题:PHP pts_openbenchmarking::evaluate_string_to_qualifier方法的具体用法?PHP pts_openbenchmarking::evaluate_string_to_qualifier怎么用?PHP pts_openbenchmarking::evaluate_string_to_qualifier使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pts_openbenchmarking的用法示例。


在下文中一共展示了pts_openbenchmarking::evaluate_string_to_qualifier方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct($identifier)
 {
     if (PTS_IS_CLIENT) {
         $ob_identifier = pts_openbenchmarking::evaluate_string_to_qualifier($identifier, true, 'suite');
         if ($ob_identifier != false) {
             $identifier = $ob_identifier;
         }
     }
     $this->identifier = $identifier;
     $this->xml_parser = new pts_suite_nye_XmlReader($identifier);
 }
开发者ID:pacificIT,项目名称:phoronix-test-suite,代码行数:11,代码来源:pts_test_suite_parser.php

示例2: __construct

 public function __construct($read = null, $normal_init = true)
 {
     $this->overrides = array();
     $this->tp_extends = null;
     if ($normal_init == false) {
         $this->identifier = $read;
         return;
     }
     if (!isset($read[200]) && strpos($read, '<?xml version="1.0"?>') === false) {
         if (PTS_IS_CLIENT && (!defined('PTS_TEST_PROFILE_PATH') || !is_file(PTS_TEST_PROFILE_PATH . $read . '/test-definition.xml'))) {
             $read = pts_openbenchmarking::evaluate_string_to_qualifier($read, true, 'test');
             if ($read == false && pts_openbenchmarking::openbenchmarking_has_refreshed() == false) {
                 // Test profile might be brand new, so refresh repository and then check
                 // pts_openbenchmarking::refresh_repository_lists(null, true);
                 $read = pts_openbenchmarking::evaluate_string_to_qualifier($read, true, 'test');
             }
         }
     }
     if (!isset($read[64])) {
         // Passed is not an identifier since it's too long
         $this->identifier = $read;
     }
     if (!isset($read[512]) && !is_file($read)) {
         if (defined('PTS_TEST_PROFILE_PATH') && is_file(PTS_TEST_PROFILE_PATH . $read . '/test-definition.xml')) {
             $read = PTS_TEST_PROFILE_PATH . $read . '/test-definition.xml';
         } else {
             if (substr($read, -4) == '.zip' && is_file($read)) {
                 $zip = new ZipArchive();
                 if ($zip->open($read) === true) {
                     $read = $zip->getFromName('test-definition.xml');
                     $zip->close();
                 }
             }
         }
     }
     //$xml_options = 0;
     //if(defined('LIBXML_COMPACT'))
     //{
     $xml_options = LIBXML_COMPACT | LIBXML_PARSEHUGE;
     //}
     if (is_file($read)) {
         $this->file_location = $read;
         $this->xml = simplexml_load_file($read, 'SimpleXMLElement', $xml_options);
     } else {
         $this->raw_xml = $read;
         if (strpos($read, '<') !== false) {
             $this->xml = simplexml_load_string($read, 'SimpleXMLElement', $xml_options);
         }
     }
 }
开发者ID:ptzafrir,项目名称:phoronix-test-suite,代码行数:50,代码来源:pts_test_profile_parser.php

示例3: __construct

 public function __construct($identifier = null)
 {
     if (strpos($identifier, '<?xml version="1.0"?>') === false) {
         if (PTS_IS_CLIENT && (!defined('PTS_TEST_PROFILE_PATH') || !is_file(PTS_TEST_PROFILE_PATH . $identifier . '/test-definition.xml'))) {
             $identifier = pts_openbenchmarking::evaluate_string_to_qualifier($identifier, true, 'test');
             if ($identifier == false && pts_openbenchmarking::openbenchmarking_has_refreshed() == false) {
                 // Test profile might be brand new, so refresh repository and then check
                 // pts_openbenchmarking::refresh_repository_lists(null, true);
                 $identifier = pts_openbenchmarking::evaluate_string_to_qualifier($identifier, true, 'test');
             }
         }
     }
     $this->xml_parser = new pts_test_nye_XmlReader($identifier);
     if (!isset($identifier[64])) {
         // Passed is not an identifier since it's too long
         $this->identifier = $identifier;
     }
 }
开发者ID:pchiruma,项目名称:phoronix-test-suite,代码行数:18,代码来源:pts_test_profile_parser.php

示例4: add_to_suite_from_reader

 public function add_to_suite_from_reader(&$xml_reader)
 {
     $test_names = $xml_reader->getXMLArrayValues('PhoronixTestSuite/Execute/Test');
     $sub_arguments = $xml_reader->getXMLArrayValues('PhoronixTestSuite/Execute/Arguments');
     $sub_arguments_description = $xml_reader->getXMLArrayValues('PhoronixTestSuite/Execute/Description');
     $sub_modes = $xml_reader->getXMLArrayValues('PhoronixTestSuite/Execute/Mode');
     $override_test_options = $xml_reader->getXMLArrayValues('PhoronixTestSuite/Execute/OverrideTestOptions');
     for ($i = 0; $i < count($test_names); $i++) {
         $identifier = pts_openbenchmarking::evaluate_string_to_qualifier($test_names[$i]);
         if (empty($identifier)) {
             echo PHP_EOL . $test_names[$i] . ' fails.' . PHP_EOL;
             exit;
         }
         $identifier = substr($identifier, 0, strrpos($identifier, '-'));
         // strip the version for now
         $this->add_to_suite($identifier, $sub_arguments[$i], $sub_arguments_description[$i], $sub_modes[$i], $override_test_options[$i]);
     }
 }
开发者ID:ShaolongHu,项目名称:phoronix-test-suite,代码行数:18,代码来源:pts_test_suite_writer.php

示例5: is_test_profile

 public static function is_test_profile($identifier)
 {
     $identifier = pts_openbenchmarking::evaluate_string_to_qualifier($identifier, true, 'test');
     return $identifier != false && is_file(PTS_TEST_PROFILE_PATH . $identifier . '/test-definition.xml') ? $identifier : false;
 }
开发者ID:pacificIT,项目名称:phoronix-test-suite,代码行数:5,代码来源:pts_test_profile.php

示例6: is_suite

 public static function is_suite($identifier)
 {
     $identifier = pts_openbenchmarking::evaluate_string_to_qualifier($identifier, true, 'suite');
     return is_file(PTS_TEST_SUITE_PATH . $identifier . '/suite-definition.xml');
 }
开发者ID:pchiruma,项目名称:phoronix-test-suite,代码行数:5,代码来源:pts_test_suite.php

示例7: handleXmlZeroTagFallback

 public function handleXmlZeroTagFallback($xml_tag, $fallback_value)
 {
     // Cascading Test Profiles for finding a tag within an XML file being extended by another XML file
     if ($xml_tag == 'PhoronixTestSuite/TestProfile/Extends' || $this->block_test_extension_support) {
         // Otherwise we'd have an infinite loop
         return $fallback_value;
     }
     $test_extends = $this->getXmlValue('PhoronixTestSuite/TestProfile/Extends');
     if (!empty($test_extends) && PTS_IS_CLIENT) {
         $test_extends = pts_openbenchmarking::evaluate_string_to_qualifier($test_extends, true, 'test');
         $test_below_parser = new pts_test_nye_XmlReader($test_extends);
         $test_below_tag = $test_below_parser->getXMLValue($xml_tag);
         if (!empty($test_below_tag)) {
             $fallback_value = $test_below_tag;
         }
     }
     return $fallback_value;
 }
开发者ID:pchiruma,项目名称:phoronix-test-suite,代码行数:18,代码来源:pts_test_nye_XmlReader.php


注:本文中的pts_openbenchmarking::evaluate_string_to_qualifier方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。