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


PHP Result::getResult方法代码示例

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


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

示例1: Result

 function check_suffix()
 {
     // result to return
     $result = new Result();
     $result->updateResult($this->check_suffix_with_casual_leave());
     if (!$result->getResult()) {
         return $result;
     }
     $result->updateResult($this->check_suffix_with_restricted_leave());
     if (!$result->getResult()) {
         return $result;
     }
     return $result;
 }
开发者ID:pkdism,项目名称:ISM-MIS,代码行数:14,代码来源:leave_helper.php

示例2: testGetResultThreshold

 /**
  * @dataProvider resultThresholdProvider
  */
 public function testGetResultThreshold($pos, $neg, $expected)
 {
     $result = new Result('Test Sample', $pos, $neg);
     $this->assertEquals($expected, $result->getResult());
 }
开发者ID:habeelety,项目名称:BayesPHP,代码行数:8,代码来源:ResultTest.php

示例3: Result

 /**
  * This function evaluates emptiness of fields
  * @return \Result
  */
 function is_required_data_filled()
 {
     $result = new Result();
     // check for leave type
     if ($_POST[Leave_application::LEAVE_TYPE] == Leave_application::EMPTY_VAL) {
         $result->setResult(FALSE);
         $result->addError("Please select type of leave.");
     }
     // check for leave start date
     if (empty($_POST[Leave_application::LEAVE_START_DATE])) {
         $result->setResult(FALSE);
         $result->addError("Please select start date.");
     }
     // if leave is not of restricted type check for end date
     if ($_POST[Leave_application::LEAVE_TYPE] != Leave_constants::$TYPE_RESTRICTED_LEAVE) {
         // check for leave end date
         if (empty($_POST[Leave_application::LEAVE_END_DATE])) {
             $result->setResult(FALSE);
             $result->addError("Please select end date.");
         }
     }
     // check for casual leave extra data if start date == end date
     if ($_POST[Leave_application::LEAVE_TYPE] === Leave_constants::$TYPE_CASUAL_LEAVE && $_POST[Leave_application::LEAVE_START_DATE] === $_POST[Leave_application::LEAVE_END_DATE] && $result->getResult()) {
         // check if half or full is marked
         if ($_POST[Leave_application::LEAVE_CASUAL_PERIOD] == Leave_application::EMPTY_VAL) {
             $result->setResult(FALSE);
             $result->addError("For casual leave of single day, please specify period half or full");
         } else {
             if ($_POST[Leave_application::LEAVE_CASUAL_PERIOD] == Leave_application::LEAVE_PERIOD_HALF && $_POST[Leave_application::LEAVE_J_NOON] == Leave_application::EMPTY_VAL) {
                 $result->setResult(FALSE);
                 $result->addError("Please select in which half you want to take leave, before noon or after noon");
             }
         }
     }
     // check for purpose
     if (empty($_POST[Leave_application::LEAVE_PURPOSE])) {
         $result->setResult(FALSE);
         $result->addError("Please mention purpose.");
     }
     return $result;
 }
开发者ID:pkdism,项目名称:ISM-MIS,代码行数:45,代码来源:leave_application.php

示例4: die

        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
        curl_setopt($ch, CURLOPT_USERAGENT, 'Flower-Color-Test-App');
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        $response = curl_exec($ch);
        curl_close($ch);
        # Parsing the response
        $decoded = json_decode($response, TRUE);
        $gistlink = $decoded['html_url'];
        die(json_encode(array('success' => true, 'hash' => str_replace('https://gist.github.com/', '', $gistlink))));
    }
}
$result = new Result();
if (isset($_GET['TxtFunc'])) {
    switch ($_GET['TxtFunc']) {
        case 'get':
            $resultId = isset($_GET['TxtID']) ? $_GET['TxtID'] : null;
            if ($resultId === NULL) {
                die(json_decode(array('result' => false, 'message' => 'Please provide result id.')));
            }
            $result->getResult($resultId);
            break;
        case 'save':
            $resultData = isset($_GET['TxtData']) ? $_GET['TxtData'] : null;
            if ($resultData === NULL) {
                die(json_decode(array('result' => false, 'message' => 'Please provide result data.')));
            }
            $result->saveResult($resultData);
            break;
    }
}
开发者ID:hieutrieu,项目名称:card,代码行数:31,代码来源:api.php

示例5: go

 public static function go($queryString, $obj = NULL)
 {
     $api = new Result($queryString, $obj);
     //----------------------------------------------------------
     return $api->count ? $api->countResult() : $api->getResult();
 }
开发者ID:awwthentic1234,项目名称:hey,代码行数:6,代码来源:Result.php

示例6: testGetResultWithoutValue

 /**
  * This test checks a that the resolved result is NULL.
  *
  * @return void
  */
 public function testGetResultWithoutValue()
 {
     $annotation = new Result('Result', array());
     $this->assertNull($annotation->getResult());
 }
开发者ID:appserver-io,项目名称:routlt,代码行数:10,代码来源:ResultTest.php


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