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


PHP TPL::objDocumentType方法代碼示例

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


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

示例1: setDocumentType

 /**
  * Will set a <DOCTYPE header for the current page. You can use this method by specifying an existing <!DOCTYPE in the FRM_DIR
  * that will change the generated document type that will be outputed to the browser. For example we use the XHTML Strict 1.0 but
  * you can opt for transitional or any other kind of <!DOCTYPE you want as long as you create the specific file at fist;
  *
  * @param S $documentType The kind of document type (xhtml, html, etc.) to set the page to
  * @return B Will return true if the content of the document DTD was loaded, else will return a false
  * @author Catalin Z. Alexandru <catalin.zamfir@raphpframework.ro>
  * @copyright Under the terms of the GNU General Public License v3
  * @version $Id: 10_TPL.php 315 2009-10-11 07:11:31Z catalin.zamfir $
  * @since Version 1.0
  * @access public
  * @static
  * @final
  */
 public static final function setDocumentType(S $documentType)
 {
     if (self::$objDocumentType = new FileContent(FORM_TP_DIR . _S . 'frm_web_header_' . $documentType . '.tp')) {
         // Do return ...
         return new B(TRUE);
     } else {
         // Do return ...
         return new B(FALSE);
     }
 }
開發者ID:ajbm6,項目名稱:raphpframework,代碼行數:25,代碼來源:10_TPL.php


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