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


PHP Text::getText方法代碼示例

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


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

示例1: delete

 function delete() {
     Category::requirePermission("DELETE");
     $link = Database::getConnection();
     $query = "DELETE FROM category WHERE id=".Database::sqlValue($this->id);
     mysql_query($query) or die(Database::formatError($query, Text::getText("QueryFailed")));
     Database::returnConnection($link);
 }
開發者ID:elecnix,項目名稱:smellyfish,代碼行數:7,代碼來源:Category.php

示例2: printContent

 function printContent() {
     ?>
       <table border="0">
         <tr bgcolor=<?=BGCOLOR_ALT?>>
           <th>#</th>
           <? if (SecurityGroup::havePermission("DELETE")) { ?>
             <th></th>
           <? } ?>
           <th><?=Text::getText("Name")?></th>
           <th>&nbsp;</th>
           <th>&nbsp;</th>
         </tr>
         <? $bg = TRUE; ?>
         <? foreach ($this->groups as $g) { ?>
           <? $bg = !$bg; ?>
           <tr<? if ($bg) { ?> bgcolor=<?=BGCOLOR_ALT?><? } ?>>
             <td>&nbsp;<?=$g->getId()?>&nbsp;</td>
             <? if (SecurityGroup::havePermission("DELETE")) { ?>
               <td><a href="<?=$this->groupDeletePage?>?<?=$this->groupDeleteParamGroupId?>=<?=$g->getId()?>" onClick="return confirm('<?=Text::getText('ConfirmDeleteGroup')?>')"><img src="<?=$this->imgDeleteSrc?>" border="0" alt="<?=Text::getText('Delete')?>"></a></td>
             <? } ?>
             <td>&nbsp;<a href="<?=$this->groupEditPage?>?<?=$this->groupEditParamGroupId?>=<?=$g->getId()?>"><?=$g->getName()?></a>&nbsp;</td>
             <td>&nbsp;<a href="<?=$this->groupMembersPage?>?<?=$this->groupMembersParamGroupId?>=<?=$g->getId()?>"><?=Text::getText("Members")?></a>&nbsp;</td>
             <td>&nbsp;<a href="<?=$this->groupPermissionsPage?>?<?=$this->groupPermissionsParamGroupId?>=<?=$g->getId()?>"><?=Text::getText("Permissions")?></a>&nbsp;</td>
           </tr>
         <? } ?>
       </table>
     <?
 }
開發者ID:elecnix,項目名稱:resaccman,代碼行數:28,代碼來源:GroupList.php

示例3: printContent

 function printContent() {
   $action = $this->getAction();
   ?>
     <form method="POST" action="<?=$action?>">
         <input type="hidden" name="action" value="save">
         <input type="hidden" name="submitted" value="yes">
         <table border="0" cellpadding="2">
             <tr>
                 <th><?=Text::getText("LoginName")?></th>
                 <td><input type="text" name="loginName" value=""></td>
             </tr>
             <tr>
                 <th><?=Text::getText("FullName")?></th>
                 <td><input type="text" name="fullName" value=""></td>
             </tr>
             <tr>
                 <th><?=Text::getText("Password")?></th>
                 <td><input type="password" name="password" value=""></td>
             </tr>
             <tr>
                 <td colspan="2" align="center">
                     <input type="submit" value="<?=Text::getText("Add")?>">
                 </td>
             </tr>
         </table>
     </form>
   <?
 }
開發者ID:elecnix,項目名稱:resaccman,代碼行數:28,代碼來源:UserAddForm.php

示例4: printContent

 function printContent() {
   ?>
     <table border="0">
       <tr bgcolor="<?=BGCOLOR_ALT?>">
         <th>#</th>
         <? if (SecurityUser::havePermission("DELETE")) { ?>
           <th></th>
         <? } ?>
         <th><?=Text::getText("FullName")?></th>
         <th><?=Text::getText("LoginName")?></th>
       </tr>
       <? $bg = TRUE; ?>
       <? foreach ($this->users as $u) { ?>
         <? $bg = !$bg; ?>
         <tr<? if ($bg) { ?> bgcolor="<?=BGCOLOR_ALT?>"<? } ?>>
           <td>&nbsp;<?=$u->getId()?>&nbsp;</td>
             <? if (SecurityUser::havePermission("DELETE")) { ?>
               <td><a href="<?=$this->userDeletePage?>?<?=$this->userDeleteUserParam?>=<?=$u->getId()?>" onClick="return confirm('<?=Text::getText('ConfirmDeleteUser')?>\n\n<?=$u->getLoginName()?>')"><img src="<?=IMAGE_TRASH?>" border="0" alt="<?=Text::getText('Delete')?>"></a></td>
             <? } ?>
             <td>&nbsp;<?=$u->getFullName()?>&nbsp;</td>
             <td>&nbsp;<a href="<?=$this->getUserPage()?>?id=<?=$u->getId()?>"><?=$u->getLoginName()?></a>&nbsp;</td>
         </tr>
       <? } ?>
     </table>
   <?
 }
開發者ID:elecnix,項目名稱:resaccman,代碼行數:26,代碼來源:UserList.php

示例5: getSubmitCaption

 /**
  * 
  */
 function getSubmitCaption()
 {
     if ($this->submitCaption == NULL) {
         return Text::getText("Submit");
     } else {
         return $this->submitCaption;
     }
 }
開發者ID:elecnix,項目名稱:resaccman,代碼行數:11,代碼來源:Form.php

示例6: insert

 /**
  * Takes an INSERT query and returns the inserted ID,
  * or 0 if query does not generate an AUTO_INCREMENT
  * value.
  */
 function insert($sql) {
     $con = Database::getConnection();
     $result = mysql_query($sql) or die(Database::formatError($sql, Text::getText("QueryFailed")));
     $record = new DatabaseRecord($result);
     $id =  mysql_insert_id($con);
     Database::returnConnection($con);
     return $id;
 }
開發者ID:elecnix,項目名稱:smellyfish,代碼行數:13,代碼來源:Database.php

示例7: testConstruct_returnsElement_ifTextIsString

 /**
  * __construct() should return text element if text is string
  */
 public function testConstruct_returnsElement_ifTextIsString()
 {
     $string = 'foo';
     $text = new Text($string);
     $this->assertTrue($text instanceof Text);
     $this->assertEquals($string, $text->getText());
     return;
 }
開發者ID:jstewmc,項目名稱:rtf,代碼行數:11,代碼來源:TextTest.php

示例8: testFormattedTextRetrieve

 public function testFormattedTextRetrieve()
 {
     $string = "Hey %s, you have %d new messages";
     $arg1 = "Joe";
     $arg2 = 15;
     $compare = "Hey Joe, you have 15 new messages";
     $retrieved = Text::getText($string, $arg1, $arg2);
     self::assertSame($compare, (string) $retrieved);
 }
開發者ID:apexstudios,項目名稱:yamwlib,代碼行數:9,代碼來源:TextTest.php

示例9: writeText

 protected function writeText(Text $textChild, $level)
 {
     $newLine = $this->_pretty ? $this->_newLine : '';
     $indent = $this->_pretty ? str_repeat($this->_tabString, $level) : '';
     $text = $textChild->getText();
     //TODO: Need some kind of mb_wordwrap here, maybe:
     //http://stackoverflow.com/questions/3825226/multi-byte-safe-wordwrap-function-for-utf-8?
     return $this->_pretty && mb_strlen($text, 'utf-8') > $this->_textWrap ? $indent . wordwrap(str_replace("\n", '', $text), $this->_textWrap, "{$newLine}{$indent}") : $text;
 }
開發者ID:talesoft,項目名稱:tale-framework,代碼行數:9,代碼來源:Writer.php

示例10: update

 function update() {
     SecurityGroup::requirePermission("CHANGE");
     if ($this->id == NULL) {
         die(Text::getText("GroupHasNoId"));
     }
     $query = "UPDATE security_group";
     $query .= " SET name=".Database::sqlValue($this->name);
     $query .= " WHERE id=".Database::sqlValue($this->id);
     Database::query($query);
 }
開發者ID:elecnix,項目名稱:smellyfish,代碼行數:10,代碼來源:SecurityGroup.php

示例11: printContent

 function printContent() {
     $u = $this->getUser();
     ?>
       <form method="POST">
           <input type="hidden" name="action" value="save">
           <table border="0" cellpadding="2">
               <tr>
                   <td colspan="2" align="center">
                       <?=Text::getText("UserInfo")?>
                   </td>
               </tr>
               <tr>
                   <th><?=Text::getText("LoginName")?></th>
                   <td><input type="text" name="loginName" value="<?=$u->getLoginName()?>"></td>
               </tr>
               <tr>
                   <th><?=Text::getText("FullName")?></th>
                   <td><input type="text" name="fullName" value="<?=$u->getFullName()?>"></td>
               </tr>
               <tr>
                   <td colspan="2" align="center">
                       &nbsp;
                   </td>
               </tr>
               <tr>
                   <td colspan="2" align="center">
                       <input type="checkbox" name="changePassword" value="true">
                       <?=Text::getText("ChangePassword")?>
                   </td>
               </tr>
               <tr>
                   <th><?=Text::getText("NewPassword")?></th>
                   <td><input type="password" name="password" value=""></td>
               </tr>
               <tr>
                   <td colspan="2" align="center">
                       <input type="submit" value="<?=$this->getSubmitCaption()?>">
                       &nbsp;
                       <input type="button" value="<?=Text::getText('Cancel')?>" onClick="document.location='<?=$this->cancelPage?>'">
                   </td>
               </tr>
           </table>
       </form>
     <?
 }
開發者ID:elecnix,項目名稱:resaccman,代碼行數:45,代碼來源:UserEditForm.php

示例12: printContent

 function printContent() {
     ?>
       <form method="POST" action="<?=$this->getAction()?>">
           <input type="hidden" name="action" value="save">
           <table border="0" cellpadding="2">
               <tr>
                   <th><?=Text::getText("Name")?></th>
                   <td><input type="text" name="name" value=""></td>
               </tr>
               <tr>
                   <td colspan="2" align="center">
                       <input type="submit" value="<?=Text::getText("Add")?>">
                   </td>
               </tr>
           </table>
       </form>
     <?
 }
開發者ID:elecnix,項目名稱:resaccman,代碼行數:18,代碼來源:GroupAddForm.php

示例13: printContent

 function printContent() {
     $g = $this->group;
     ?>    
       <form action="<?=$this->getAction()?>" method="POST">
           <input type="hidden" name="action" value="save">
           <table border="0" cellpadding="2">
               <tr>
                   <th><?=Text::getText("Name")?></th>
                   <td><input type="text" name="name" value="<?=$g->getName()?>"></td>
               </tr>
               <tr>
                   <td colspan="2" align="center">
                       <input type="submit" value="<?=Text::getText('Save')?>">
                       &nbsp;
                       <input type="button" value="<?=Text::getText('Cancel')?>" onClick="document.location='<?=$this->cancelPage?>'">
                   </td>
               </tr>
           </table>
       </form>
     <?
 }
開發者ID:elecnix,項目名稱:resaccman,代碼行數:21,代碼來源:GroupEditForm.php

示例14: printContent

 function printContent() {
     $g = $this->getGroup();
     $allPermissions = SecurityPermission::getAll();
     $allResources = SecurityResource::getAll();
     $msg = $this->getMessage();
     ?>
       <form action="<?=$this->getAction()?>" method="post">
         <input type="hidden" name="group" value="<?=$g->getId()?>">
         <? if (strlen($msg) > 0) { ?>
           <p><b><?=$msg?></b></p>
         <? } ?>
         <p>
         <table border="0">
           <tr>
             <td>
               <table border="0">
                 <tr bgcolor="<?=BGCOLOR_ALT?>">
                   <th><?=Text::getText("Resource")?></th>
                   <? foreach ($allPermissions as $perm) { ?>
                     <th><?=$perm->getName()?></th>
                   <? } ?>
                 </tr>
                 <? $bg = TRUE; ?>
                 <? foreach ($allResources as $res) { ?>
                   <? $bg = !$bg; ?>
                   <tr<? if ($bg) { ?> bgcolor="<?=BGCOLOR_ALT?>"<? } ?>>
                     <td><?=$res->getName()?></td>
                     <? foreach ($allPermissions as $perm) { ?>
                       <?
                         $checked = "";
                         if ($g->hasPermission($res, $perm)) {
                             $checked = " checked";
                         }
                       ?>
                       <td align="center"><input type="checkbox"<?=$checked?> name="res<?=$res->getId()?>_perm<?=$perm->getId()?>"></td>
                     <? } ?>
                   </tr>
                 <? } ?>
               </table>
             </td>
           </tr>
           <tr>
             <td align="center">
               <input type="submit" value="<?=Text::getText("Save")?>">
             </td>
           </tr>
         </table>
         </p>
       </form>
     <?
 }
開發者ID:elecnix,項目名稱:resaccman,代碼行數:51,代碼來源:GroupPermissionsForm.php

示例15:

</h2>

<form method="POST">
    <input type="hidden" name="action" value="save">
    <table border="0" cellpadding="2">
        <tr>
            <th><?php 
echo Text::getText("Name");
?>
</th>
            <td><input type="text" name="name" value="<?php 
echo $g->getName();
?>
"></td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <input type="submit" value="<?php 
echo Text::getText("Save");
?>
">
                &nbsp;
                <input type="button" value="<?php 
echo Text::getText("Cancel");
?>
" onClick="document.location='groups.php'">
            </td>
        </tr>
    </table>
</form>
開發者ID:elecnix,項目名稱:smellyfish,代碼行數:30,代碼來源:groupEditForm.php


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