本文整理匯總了PHP中phodevi::is_vendor_string方法的典型用法代碼示例。如果您正苦於以下問題:PHP phodevi::is_vendor_string方法的具體用法?PHP phodevi::is_vendor_string怎麽用?PHP phodevi::is_vendor_string使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類phodevi
的用法示例。
在下文中一共展示了phodevi::is_vendor_string方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: auto_generate_results_identifier
public function auto_generate_results_identifier()
{
// If the save result identifier is empty, try to come up with something based upon the tests being run.
$results_identifier = null;
$subsystem_r = array();
$subsystems_to_test = $this->subsystems_under_test();
if (!$this->is_new_result_file) {
$result_file_intent = pts_result_file_analyzer::analyze_result_file_intent($this->result_file);
if (is_array($result_file_intent) && $result_file_intent[0] != 'Unknown') {
array_unshift($subsystems_to_test, $result_file_intent[0]);
}
}
foreach ($subsystems_to_test as $subsystem) {
$components = pts_result_file_analyzer::system_component_string_to_array(phodevi::system_hardware(true) . ', ' . phodevi::system_software(true));
if ($subsystem != null && isset($components[$subsystem])) {
$subsystem_name = pts_strings::trim_search_query($components[$subsystem]);
if (phodevi::is_vendor_string($subsystem_name) && !in_array($subsystem_name, $subsystem_r)) {
array_push($subsystem_r, $subsystem_name);
}
if (isset($subsystem_r[2]) || isset($subsystem_name[19])) {
break;
}
}
}
if (isset($subsystem_r[0])) {
$results_identifier = implode(' - ', $subsystem_r);
}
if (empty($results_identifier) && !$this->batch_mode) {
$results_identifier = phodevi::read_property('cpu', 'model') . ' - ' . phodevi::read_property('gpu', 'model') . ' - ' . phodevi::read_property('motherboard', 'identifier');
}
if (strlen($results_identifier) > 55) {
$results_identifier = substr($results_identifier, 0, 54);
$results_identifier = substr($results_identifier, 0, strrpos($results_identifier, ' '));
}
if (empty($results_identifier)) {
$results_identifier = date('Y-m-d H:i');
}
$this->results_identifier = $results_identifier;
return $results_identifier;
}
示例2: is_product_string
public static function is_product_string($product)
{
return phodevi::is_vendor_string($product) && !pts_strings::has_in_istring($product, array('VBOX', 'QEMU', 'Virtual', 'Family', '440BX', 'VMware', ' Gen', 'Core IGP'));
}