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


PHP Audit::populate方法代码示例

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


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

示例1: generateDefaultHandlerObject

    /**
     * Generate Health Status Alerts default object for condition
     * @return string PHP code for handlerObject
     */
    public function generateDefaultHandlerObject()
    {
        $audit = new Audit();
        $audit->auditId = $this->condition;
        $audit->populate();
        $handlerName = Handler::normalizeHandlerName($this->name);
        $healthStatusHandler = '';
        $objectClass = $audit->objectClass;
        if (strlen($objectClass) > 0 && class_exists($objectClass)) {
            $tmp = new $objectClass();
            $healthStatusHandler .= <<<EOL
\t\tif (\$auditOrm->objectClass == '{$objectClass}' && \$auditOrm->type == '{$audit->type}') {
\t\t\treturn true;
\t\t}
EOL;
        }
        $handlerObject = <<<EOL

class {$handlerName}HealthStatusHandlerObject extends HealthStatusHandlerObjectAbstract {
\t//abstract requires at least this method
\tpublic static function matchAudit(HealthStatusHandler \$handler,Audit \$auditOrm) {
{$healthStatusHandler}
\t\treturn false;
\t}

\tpublic static function fulfill(HealthStatusHandler \$handler,\$patientId) {
\t}

\tpublic static function patientMatch(HealthStatusHandler \$handler,\$patientId) {
\t}
}

EOL;
        return $handlerObject;
    }
开发者ID:dragonlet,项目名称:clearhealth,代码行数:39,代码来源:HealthStatusHandler.php

示例2: processResendOutboundFaxAction

 public function processResendOutboundFaxAction()
 {
     $messagingId = (int) $this->_getParam('messagingId');
     $faxNumber = $this->_getParam('faxNumber');
     $messaging = new Messaging();
     if ($messagingId > 0) {
         $messaging->messagingId = $messagingId;
         $messaging->populate();
     }
     if ($messagingId->auditId > 0) {
         $messaging->faxNumber = '';
         if (is_numeric($faxNumber) && strlen($faxNumber) > 9) {
             $messaging->faxNumber = $faxNumber;
         }
         $messaging->resend = 1;
         $messaging->persist();
         $audit = new Audit();
         $audit->auditId = $messagingAudit->auditId;
         $audit->populate();
         $audit->startProcessing = '0000-00-00 00:00:00';
         $audit->endProcessing = '0000-00-00 00:00:00';
         $audit->persist();
     }
     $json = Zend_Controller_Action_HelperBroker::getStaticHelper('json');
     $json->suppressExit = true;
     $json->direct(true);
 }
开发者ID:dragonlet,项目名称:clearhealth,代码行数:27,代码来源:MessagingController.php

示例3: generateHSADefaultConditionObject

    /**
     * Generate Health Status Alerts default object for condition
     * @return string PHP code for conditionObject
     */
    public function generateHSADefaultConditionObject()
    {
        $audit = new Audit();
        $audit->auditId = $this->condition;
        $audit->populate();
        $handlerName = self::normalizeHandlerName($this->name);
        $conditionHandler = '';
        $dataIntegrationDatasource = '';
        $objectClass = $audit->objectClass;
        if (strlen($objectClass) > 0 && class_exists($objectClass)) {
            $tmp = new $objectClass();
            $conditionHandler .= <<<EOL
\t\tif (\$auditOrm->objectClass == '{$objectClass}' && \$auditOrm->type == '{$audit->type}') {
\t\t\treturn true;
\t\t}
EOL;
            $dataIntegrationDatasource .= <<<EOL
\t\tif (class_exists('{$objectClass}')) {
\t\t\t\$orm = new {$objectClass}();
EOL;
            foreach ($tmp->_primaryKeys as $key) {
                $dataIntegrationDatasource .= <<<EOL

\t\t\t\$orm->{$key} = {$audit->objectId};
EOL;
            }
            $dataIntegrationDatasource .= <<<EOL

\t\t\t\$orm->populate();
\t\t\t\$ret = \$orm->toArray();
\t\t}
EOL;
        }
        $conditionObject = <<<EOL

class {$handlerName}ConditionHandler extends DataIntegrationConditionHandlerAbstract {
\t//abstract requires at least this method
\tpublic static function matchAudit(Audit \$auditOrm) {
{$conditionHandler}
\t\treturn false;
\t}

\tpublic static function fulfill(HealthStatusAlert \$alert) {
\t\t\$alert->status = 'fulfilled';
\t\t\$alert->persist();
\t}

\tpublic static function patientMatch(Handler \$handler,Patient \$patient) {
\t\t// get/retrieve patient alert using personId of \$patient and handlerId of \$handler
\t\t\$alert = new HealthStatusAlert();
\t\t\$alert->populateByHandlerPatientId(\$handler->handlerId,\$patient->personId);
\t\tif (strlen(\$alert->status) > 0) {
\t\t\t//return true;
\t\t}
\t\tif (\$alert->status == 'active' || \$alert->status == 'fulfilled' || \$alert->status == 'ignored') {
\t\t\treturn false;
\t\t}
\t\treturn true;
\t}
}

class {$handlerName}DataIntegrationDatasource extends DataIntegrationDatasourceAbstract {
\t//abstract requires at least this method
\tpublic static function sourceData(Audit \$auditOrm) {
\t\t\$ret = array();
{$dataIntegrationDatasource}
\t\treturn \$ret;
\t}
}

EOL;
        return $conditionObject;
    }
开发者ID:dragonlet,项目名称:clearhealth,代码行数:77,代码来源:Handler.php


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