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


PHP Shell::isPerlAvailable方法代碼示例

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


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

示例1: getServerDataFieldset

 /**
  * Get fieldset for server data
  * @return \FormularFieldset
  */
 private function getServerDataFieldset()
 {
     $Fieldset = new FormularFieldset(__('Server information'));
     $Fieldset->addSmallInfo(__('PHP version:') . ' ' . PHP_VERSION);
     $Fieldset->addSmallInfo(__('MySQL version:') . ' ' . DB::getInstance()->getAttribute(PDO::ATTR_SERVER_VERSION));
     $Fieldset->addSmallInfo(__('Time limit:') . ' ' . ini_get('max_execution_time'));
     $Fieldset->addSmallInfo(__('Memory limit:') . ' ' . ini_get('memory_limit'));
     $Fieldset->addSmallInfo(__('Upload limit:') . ' ' . ini_get('upload_max_filesize'));
     $Fieldset->addSmallInfo(__('Post limit:') . ' ' . ini_get('post_max_size'));
     if (Shell::isPerlAvailable()) {
         $Fieldset->addSmallInfo(__('Perl scripts can be used.'));
     } else {
         $Fieldset->addWarning(__('Perl scripts cannot be used.'));
     }
     $Fieldset->setCollapsed();
     return $Fieldset;
 }
開發者ID:rob-st,項目名稱:Runalyze,代碼行數:21,代碼來源:class.AdminView.php

示例2: testHRV

 public function testHRV()
 {
     if (Shell::isPerlAvailable()) {
         $this->object->parseFile('../tests/testfiles/fit/HRV-example.fit');
         $this->assertFalse($this->object->hasMultipleTrainings());
         $this->assertFalse($this->object->failed());
         $this->assertTrue($this->object->object()->hasArrayHRV());
     }
 }
開發者ID:n0rthface,項目名稱:Runalyze,代碼行數:9,代碼來源:ImporterFiletypeFITTest.php

示例3: testMultisportTriathlonFromFenix3

 public function testMultisportTriathlonFromFenix3()
 {
     if (Shell::isPerlAvailable()) {
         $this->object->parseFile('../tests/testfiles/fit/multisport-triathlon-fenix3.fit');
         $this->assertFalse($this->object->failed());
         $this->assertTrue($this->object->hasMultipleTrainings());
         $this->assertEquals(5, $this->object->numberOfTrainings());
         $Swimming = $this->object->object(0);
         $this->assertEquals('09.08.2015 09:13:03', date('d.m.Y H:i:s', $Swimming->getTimestamp()));
         $this->assertEquals(1.526, $Swimming->getDistance());
         $this->assertEquals(2033, $Swimming->getTimeInSeconds());
         $this->assertTrue($Swimming->hasArrayDistance());
         $this->assertTrue($Swimming->hasArrayCadence());
         $this->assertFalse($Swimming->hasArrayHeartrate());
         $this->assertTrue($Swimming->hasArrayAltitude());
         $this->assertFalse($Swimming->hasArrayVerticalOscillation());
         $this->assertFalse($Swimming->hasArrayGroundContact());
         $Transition1 = $this->object->object(1);
         $this->assertEquals('09.08.2015 09:48:47', date('d.m.Y H:i:s', $Transition1->getTimestamp()));
         $this->assertEquals(0.367, $Transition1->getDistance());
         $this->assertEquals(165, $Transition1->getTimeInSeconds());
         $Cycling = $this->object->object(2);
         $this->assertEquals('09.08.2015 09:51:35', date('d.m.Y H:i:s', $Cycling->getTimestamp()));
         $this->assertEquals(40.261, $Cycling->getDistance());
         $this->assertEquals(4455, $Cycling->getTimeInSeconds());
         $this->assertTrue($Cycling->hasArrayDistance());
         $this->assertFalse($Cycling->hasArrayCadence());
         $this->assertTrue($Cycling->hasArrayHeartrate());
         $this->assertTrue($Cycling->hasArrayAltitude());
         $this->assertFalse($Cycling->hasArrayVerticalOscillation());
         $this->assertFalse($Cycling->hasArrayGroundContact());
         $Transition2 = $this->object->object(3);
         $this->assertEquals('09.08.2015 11:05:48', date('d.m.Y H:i:s', $Transition2->getTimestamp()));
         $this->assertEquals(0.419, $Transition2->getDistance());
         $this->assertEquals(109, $Transition2->getTimeInSeconds());
         $Running = $this->object->object(4);
         $this->assertEquals('09.08.2015 11:07:41', date('d.m.Y H:i:s', $Running->getTimestamp()));
         $this->assertEquals(9.317, $Running->getDistance());
         $this->assertEquals(2381, $Running->getTimeInSeconds());
         $this->assertTrue($Running->hasArrayDistance());
         $this->assertTrue($Running->hasArrayCadence());
         $this->assertTrue($Running->hasArrayHeartrate());
         $this->assertTrue($Running->hasArrayAltitude());
         $this->assertTrue($Running->hasArrayVerticalOscillation());
         $this->assertTrue($Running->hasArrayGroundContact());
     }
 }
開發者ID:9x,項目名稱:Runalyze,代碼行數:47,代碼來源:ImporterFiletypeFITTest.php

示例4: testOsynceTimeProblem

 public function testOsynceTimeProblem()
 {
     if (Shell::isPerlAvailable()) {
         $this->object->parseFile('../tests/testfiles/fit/osynce-stop-bug.fit');
         $this->assertFalse($this->object->hasMultipleTrainings());
         $this->assertFalse($this->object->failed());
         $this->assertEquals('osynce', $this->object->object()->getCreator());
         $this->assertEquals(47 * 60 + 6, $this->object->object()->getTimeInSeconds());
         $this->assertEquals(47 * 60 + 6, $this->object->object()->getArrayTimeLastPoint());
         $this->assertEquals(15.5, $this->object->object()->getDistance(), '', 0.1);
         $this->assertTrue($this->object->object()->hasArrayTime());
         $this->assertTrue($this->object->object()->hasArrayDistance());
         $this->assertTrue($this->object->object()->hasArrayAltitude());
         $this->assertTrue($this->object->object()->hasArrayHeartrate());
         $this->assertTrue($this->object->object()->hasArrayCadence());
         $this->assertTrue($this->object->object()->hasArrayTemperature());
         $this->assertTrue($this->object->object()->hasArrayPower());
         $timeArray = $this->object->object()->getArrayTime();
         $num = count($timeArray);
         for ($i = 2; $i < $num; ++$i) {
             if ($timeArray[$i] < $timeArray[$i - 1]) {
                 $this->assertTrue(false, sprintf('Time array is not continuously increasing: %u < %u at index %u', $timeArray[$i], $timeArray[$i - 1], $i));
                 break;
             }
         }
     }
 }
開發者ID:Nugman,項目名稱:Runalyze,代碼行數:27,代碼來源:ImporterFiletypeFITTest.php


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