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


PHP S::prependString方法代码示例

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


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

示例1: getProducts

 /**
  * Will return an array of products that meet the SQL condition;
  *
  * This method will return the array of products that meet the passed SQL condition. This way we are certain that we will
  * return a limited amount of products that we can use.
  *
  * @param S $objSQLCondition The passed SQL condition;
  * @return array The result array;
  */
 public function getProducts(S $objSQLCondition = NULL)
 {
     // Do return ...
     return $this->_Q(_QS('doSELECT')->doToken('%what', new S('t1.*'))->doToken('%table', self::$objProductsTable)->doToken('%condition', $objSQLCondition->prependString(_SP)->prependString('AS t1')));
 }
开发者ID:ajbm6,项目名称:raphpframework,代码行数:14,代码来源:00_Products.php

示例2: getCacheFileName

 /**
  * Will return a FilePath (a string) containing the stored cache file. This method is the core of our caching mechanism,
  * providing a way to avoid conflicts in cached file names, a way to make the caching mechanism URL variable or not and a way
  * to cache files only for a specific time;
  *
  * @param S $tpFileName Path to the executed .tp file
  * @param I $templateCacheTime How much time the cache file needs to be stored/compared tp
  * @return M Will return either a boolean or a string
  * @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 private
  * @static
  */
 private static function getCacheFileName(FilePath $tpFileName, I $templateCacheTime, B $tpInvariable = NULL)
 {
     // Make the CACHE sub-directory && set some requirements;
     $objTPLNoChange = $tpInvariable == NULL ? new B(FALSE) : new B(TRUE);
     // Make CACHE directory, based on variable ...
     if ($objTPLNoChange->toBoolean() == FALSE) {
         // Make the cache dir, based on _GET array (page);
         $objTPLCacheDir = new S('dir_cache_' . ($objSHA1 = sha1(implode(_U, $_GET->toArray()))));
     } else {
         // Invariate the cache directory ...
         $objTPLCacheDir = new S('dir_cache_' . ($objSHA1 = sha1($tpFileName . $templateCacheTime)));
     }
     // Get the a/b/c/d directory structure
     for ($i = 0; $i < strlen($objSHA1); ++$i) {
         // Append the DIR ...
         $objTPLCacheDir->prependString('cache_' . $objSHA1[$i] . _S);
     }
     // Make directories, recursive ...
     if (!is_dir(DOCUMENT_ROOT . CACHE_DIR . _S . $objTPLCacheDir)) {
         // Mkdir, recursive ...
         mkdir(DOCUMENT_ROOT . CACHE_DIR . _S . $objTPLCacheDir, 0777, TRUE);
     }
     // Make the cache_fname string;
     if ($objTPLNoChange->toBoolean() == FALSE) {
         // Do return variable to _GET array;
         return new FilePath(CACHE_DIR . _S . $objTPLCacheDir . _S . 'cache_' . sha1($tpFileName . md5($templateCacheTime . implode(_U, $_GET->toArray()) . self::$objTpEXECounter->doInc())) . _U . md5($tpFileName . $templateCacheTime . implode(_U, $_GET->toArray())), FALSE);
     } else {
         // Do return unvariable to _GET array (to page I mean);
         return new FilePath(CACHE_DIR . _S . $objTPLCacheDir . _S . 'cache_' . sha1($tpFileName . md5($templateCacheTime)) . _U . md5($tpFileName . $templateCacheTime), FALSE);
     }
 }
开发者ID:ajbm6,项目名称:raphpframework,代码行数:46,代码来源:10_TPL.php

示例3: checkModuleIsRegistered

 /**
  * Will check if a module was registered with the framework. Given a string (to the path) of the module, it will check to see
  * if that module was defined or not;
  *
  * @param FilePath $modNameToCheck The path of the module to check for
  * @return B Will return true if the module was registered with us
  * @author Catalin Z. Alexandru <catalin.zamfir@raphpframework.ro>
  * @copyright Under the terms of the GNU General Public License v3
  * @version $Id: 15_MOD.php 314 2009-10-09 14:24:35Z catalin.zamfir $
  * @since Version 1.0
  * @access public
  * @static
  * @final
  */
 public static final function checkModuleIsRegistered(S $modNameToCheck)
 {
     if (isset(self::$objRegisteredModules[$modNameToCheck->prependString(DOCUMENT_ROOT)])) {
         // Do return ...
         return new B(TRUE);
     } else {
         // Do return ...
         return new B(FALSE);
     }
 }
开发者ID:ajbm6,项目名称:raphpframework,代码行数:24,代码来源:15_MOD.php

示例4: doMAIL

 /**
  * Will send the email, at the specified address, using the specified subject and content;
  *
  * This method will send out the given email and subject, to the given address, while decoding the content from entities; You,
  * as the user, SHOULD ALWAYS remember, that the content gets decoded in this method, thus allowing you to work with your
  * content where you've called it, without modifying it;
  *
  * @param S $objMAILTo The email to send it to;
  * @param S $objMAILSubject The subject to set;
  * @param S $objMAILContent And the content;
  * @todo CLEAN THIS URGENTLY! ...
  */
 public function doMAIL(S $objMAILTo, S $objMAILSubject, S $objMAILContent)
 {
     // First of ALL, get a CLONE ...
     $objMAILClone = clone $objMAILContent;
     $objMAILClone = $objMAILClone->entityDecode(ENT_QUOTES)->stripTags();
     // #0: proper MULTIPART;
     $objMAILContent->prependString(new S(_N_))->prependString(_S(self::MAIL_HEADER_CONTENT_ENCODING_SEVENBIT . _N_))->prependString(_S(self::MAIL_HEADER_CONTENT_TYPE_HTML . _N_))->prependString(_S(self::MAIL_HEADER_PHP_ALTERNATIVE . _N_)->doToken('%s', self::$objHASHId))->prependString(_S(_N_))->prependString(_S($objMAILClone . _N_))->prependString(_S(_N_))->prependString(_S(self::MAIL_HEADER_CONTENT_ENCODING_SEVENBIT . _N_))->prependString(_S(self::MAIL_HEADER_CONTENT_TYPE_PLAIN . _N_))->prependString(_S(self::MAIL_HEADER_PHP_ALTERNATIVE . _N_)->doToken('%s', self::$objHASHId))->prependString(_S(_N_))->prependString(_S(self::MAIL_HEADER_MULTIPART_ALTERNATIVE . _N_)->doToken('%s', self::$objHASHId))->prependString(_S(self::MAIL_HEADER_PHP_MIXED . _N_)->doToken('%s', self::$objHASHId));
     // #4: ... end PLAIN and HTML ...
     $objMAILContent->appendString(_S(_N_))->appendString(_S(self::MAIL_HEADER_PHP_ALTERNATIVE_END . _N_)->doToken('%s', self::$objHASHId));
     // #5: ... attachments;
     foreach (self::$objEMLAttachment as $k => $v) {
         // #5.1
         $objMAILContent->appendString(_S(self::MAIL_HEADER_PHP_MIXED . _N_)->doToken('%s', self::$objHASHId))->appendString(_S(self::MAIL_HEADER_ATTACHMENT_TYPE_NAME . _N_)->doToken('%t', $v['attachment_type'])->doToken('%n', $v['attachment_name']))->appendString(_S(self::MAIL_HEADER_ENCODING_BASE64 . _N_))->appendString(_S(self::MAIL_HEADER_DISPOSITION_ATTACHMENT . _N_))->appendString(_S(_N_))->appendString($v['attachment_base64'])->appendString(_S(self::MAIL_HEADER_PHP_MIXED . _N_)->doToken('%s', self::$objHASHId));
     }
     // Finish ...
     $objMAILContent->appendString(_S(_N_))->appendString(_S(self::MAIL_HEADER_PHP_MIXED_END)->doToken('%s', self::$objHASHId));
     // Go ... everyhing IS ok and life's grand ...
     MAIL($objMAILTo, $objMAILSubject, $objMAILContent->entityDecode(ENT_QUOTES), self::$objFromHeader . self::$objReceiptTo . self::$objReplyTo . self::$objMIMEHeader . self::$objTypeHTML);
 }
开发者ID:ajbm6,项目名称:raphpframework,代码行数:31,代码来源:16_ALG.php


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