Overview

Packages

  • CONTENIDO
  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentRssCreator
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • mpAutoloaderClassMap
  • None
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SearchSolr
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob
  • Smarty
    • Cacher
    • Compiler
    • Config
    • Debug
    • PluginsBlock
    • PluginsFilter
    • PluginsFunction
    • PluginsInternal
    • PluginsModifier
    • PluginsModifierCompiler
    • PluginsShared
    • Security
    • Template
    • TemplateResources
  • Swift
    • ByteStream
    • CharacterStream
    • Encoder
    • Events
    • KeyCache
    • Mailer
    • Mime
    • Plugins
    • Transport

Classes

  • Swift_FailoverTransport
  • Swift_LoadBalancedTransport
  • Swift_MailTransport
  • Swift_Plugins_Loggers_ArrayLogger
  • Swift_Plugins_Loggers_EchoLogger
  • Swift_SendmailTransport
  • Swift_SmtpTransport
  • Swift_Transport_AbstractSmtpTransport
  • Swift_Transport_Esmtp_Auth_CramMd5Authenticator
  • Swift_Transport_Esmtp_Auth_LoginAuthenticator
  • Swift_Transport_Esmtp_Auth_PlainAuthenticator
  • Swift_Transport_Esmtp_AuthHandler
  • Swift_Transport_EsmtpTransport
  • Swift_Transport_FailoverTransport
  • Swift_Transport_LoadBalancedTransport
  • Swift_Transport_MailTransport
  • Swift_Transport_SendmailTransport
  • Swift_Transport_SimpleMailInvoker
  • Swift_Transport_StreamBuffer

Interfaces

  • Swift_Plugins_Logger
  • Swift_Plugins_Pop_Pop3Exception
  • Swift_Transport
  • Swift_Transport_Esmtp_Authenticator
  • Swift_Transport_EsmtpHandler
  • Swift_Transport_IoBuffer
  • Swift_Transport_MailInvoker
  • Swift_Transport_SmtpAgent
  • Swift_TransportException
  • Overview
  • Package
  • Function
  • Todo
  • Download
 1: <?php
 2: /**
 3:  * Smarty shared plugin
 4:  *
 5:  * @package    Smarty
 6:  * @subpackage PluginsShared
 7:  */
 8: if (!function_exists('smarty_mb_str_replace')) {
 9: 
10:     /**
11:      * Multibyte string replace
12:      *
13:      * @param  string $search  the string to be searched
14:      * @param  string $replace the replacement string
15:      * @param  string $subject the source string
16:      * @param  int    &$count  number of matches found
17:      *
18:      * @return string replaced string
19:      * @author Rodney Rehm
20:      */
21:     function smarty_mb_str_replace($search, $replace, $subject, &$count = 0)
22:     {
23:         if (!is_array($search) && is_array($replace)) {
24:             return false;
25:         }
26:         if (is_array($subject)) {
27:             // call mb_replace for each single string in $subject
28:             foreach ($subject as &$string) {
29:                 $string = & smarty_mb_str_replace($search, $replace, $string, $c);
30:                 $count += $c;
31:             }
32:         } elseif (is_array($search)) {
33:             if (!is_array($replace)) {
34:                 foreach ($search as &$string) {
35:                     $subject = smarty_mb_str_replace($string, $replace, $subject, $c);
36:                     $count += $c;
37:                 }
38:             } else {
39:                 $n = max(count($search), count($replace));
40:                 while ($n --) {
41:                     $subject = smarty_mb_str_replace(current($search), current($replace), $subject, $c);
42:                     $count += $c;
43:                     next($search);
44:                     next($replace);
45:                 }
46:             }
47:         } else {
48:             $parts = mb_split(preg_quote($search), $subject);
49:             $count = count($parts) - 1;
50:             $subject = implode($replace, $parts);
51:         }
52: 
53:         return $subject;
54:     }
55: }
56: 
CMS CONTENIDO 4.9.7 API documentation generated by ApiGen