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


PHP ZendT_Lib::convertObjectToUri方法代码示例

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


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

示例1: runAction

 public function runAction()
 {
     $_job = new Profile_Model_Job_Mapper();
     $_job->setId($this->getRequest()->getParam('id'))->retrive()->setDhUltExec("SYSDATE")->update();
     $_view = new Profile_DataView_Job_Users();
     $where = new ZendT_Db_Where();
     $where->addFilter('profile_job.id', $this->getRequest()->getParam('id'));
     $where->addFilter('usuario.email', "", "!NULL");
     $data = $_view->recordset($where);
     while ($row = $data->getRow()) {
         try {
             $uri = $row['uri']->get();
             if ($uri == '') {
                 $uri = ZendT_Lib::convertObjectToUri($row['objeto']->get());
             }
             $uriOriginal = $uri . '/dynamic/profile/' . $row['id_profile']->get();
             $uri .= '/found/profile/' . $row['id_profile']->get() . '/no_location/1?' . $row['uri_token']->get();
             $client = new Zend_Http_Client($uri, array('timeout' => '80'));
             $response = $client->request();
             if ($response->getBody() == 'OK') {
                 $mail = new ZendT_Mail();
                 $mail->addTo($row['email_usuario']->get(), $row['nome_usuario']->get());
                 $mail->addFrom('no-reply@tanet.com.br', 'Transportadora Americana');
                 $mail->setTitle($row['nome']->get());
                 $mail->setSubject($row['nome']->get());
                 $comment = $row['observacao']->get();
                 if (!$comment) {
                     $comment = $row['nome']->get();
                 }
                 $comment .= '<br><br>Para acessar o relatório clique <a href = "' . str_replace(array('/found/', '/no_location/1'), array('/dynamic/', ''), $uri) . '">aqui</a>';
                 $mail->setComment($comment);
                 $body = '<br>';
                 $user = array();
                 $user['id'] = $row['id_usuario']->get();
                 $user['role'] = $row['nome_papel']->get();
                 $listProfile = ZendT_Profile::listProfile($row['objeto']->get(), '', $user);
                 if (count($listProfile) > 0) {
                     $body .= '<style type="text/css">';
                     $body .= '    <!--';
                     $body .= '    td {';
                     $body .= '            font-family: Arial, Helvetica, sans-serif;';
                     $body .= '            font-size: 12px;';
                     $body .= '    }';
                     $body .= '    .TitleTable {';
                     $body .= '            font-weight: bold;';
                     $body .= '            border-bottom: 0px;';
                     $body .= '    }';
                     $body .= '    .viewTitle {';
                     $body .= '            background-color: #F9F9F9;';
                     $body .= '            font-weight: bold;';
                     $body .= '    }';
                     $body .= '    .viewTable {';
                     $body .= '            border:1px solid #CCCCCC;';
                     $body .= '    }';
                     $body .= '    -->';
                     $body .= '</style>';
                     $body .= '<table width="100%" border="0" cellpadding="5" cellspacing="0" class="viewTable">';
                     $body .= '	<tr >';
                     $body .= '		<td class="viewTitle">Visões Disponíveis</td>';
                     $body .= '	</tr>';
                     $body .= '	<tr>';
                     $body .= '		<td>';
                     $body .= '			<table width="100%" border="0" cellpadding="5" cellspacing="0">';
                     $body .= '				<tr>';
                     $body .= '					<td class="TitleTable">Tipo</td>';
                     $body .= '					<td class="TitleTable">Visão</td>';
                     $body .= '					<td class="TitleTable">Observação</td>';
                     $body .= '				</tr>';
                     foreach ($listProfile as $profile => $detailProfile) {
                         $uri = ZendT_Lib::convertObjectToUri($row['objeto']->get()) . '/found/profile/' . $profile . '?' . $row['uri_token']->get();
                         $body .= '				<tr>';
                         $body .= '					<td>' . $detailProfile['tipoDescricao'] . '</td>';
                         $body .= '					<td><a href = "' . str_replace('/found/', '/dynamic/', $uri) . '">' . $detailProfile['nome'] . '</a></td>';
                         $body .= '					<td>' . $detailProfile['observacao'] . '</td>';
                         $body .= '				</tr>';
                     }
                     $body .= '			</table>';
                     $body .= '		</td>';
                     $body .= '	</tr>';
                     $body .= '</table>';
                 }
                 $mail->setBody($body);
                 $mail->save();
             }
         } catch (Exception $ex) {
             $mail = new ZendT_Mail();
             /* $mail->addTo("rafael.santos@tanet.com.br"); */
             $mail->addTo("erro.sistemas@tanet.com.br");
             $mail->addFrom('no-reply@tanet.com.br', 'Transportadora Americana');
             $mail->setTitle('Erro no envio de e-mail pelo agendamento de tarefa');
             $mail->setSubject($mail->getTitle());
             $comment = $row['nome']->get() . '<br><br>Para acessar o relatório clique <a href = "' . $uriOriginal . '">aqui</a>';
             $mail->setComment($comment);
             $mail->setBody($ex->getMessage());
             $mail->save();
             /*echo 'Erro';
               exit;*/
         }
     }
     echo 'Processado';
//.........这里部分代码省略.........
开发者ID:rtsantos,项目名称:mais,代码行数:101,代码来源:JobController.php


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