當前位置: 首頁>>代碼示例>>PHP>>正文


PHP pts_openbenchmarking::openbenchmarking_has_refreshed方法代碼示例

本文整理匯總了PHP中pts_openbenchmarking::openbenchmarking_has_refreshed方法的典型用法代碼示例。如果您正苦於以下問題:PHP pts_openbenchmarking::openbenchmarking_has_refreshed方法的具體用法?PHP pts_openbenchmarking::openbenchmarking_has_refreshed怎麽用?PHP pts_openbenchmarking::openbenchmarking_has_refreshed使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在pts_openbenchmarking的用法示例。


在下文中一共展示了pts_openbenchmarking::openbenchmarking_has_refreshed方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __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

示例2: __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


注:本文中的pts_openbenchmarking::openbenchmarking_has_refreshed方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。