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: 
 9: /**
10:  * convert characters to their decimal unicode equivalents
11:  *
12:  * @link   http://www.ibm.com/developerworks/library/os-php-unicode/index.html#listing3 for inspiration
13:  *
14:  * @param string $string   characters to calculate unicode of
15:  * @param string $encoding encoding of $string, if null mb_internal_encoding() is used
16:  *
17:  * @return array sequence of unicodes
18:  * @author Rodney Rehm
19:  */
20: function smarty_mb_to_unicode($string, $encoding = null)
21: {
22:     if ($encoding) {
23:         $expanded = mb_convert_encoding($string, "UTF-32BE", $encoding);
24:     } else {
25:         $expanded = mb_convert_encoding($string, "UTF-32BE");
26:     }
27: 
28:     return unpack("N*", $expanded);
29: }
30: 
31: /**
32:  * convert unicodes to the character of given encoding
33:  *
34:  * @link   http://www.ibm.com/developerworks/library/os-php-unicode/index.html#listing3 for inspiration
35:  *
36:  * @param integer|array $unicode  single unicode or list of unicodes to convert
37:  * @param string        $encoding encoding of returned string, if null mb_internal_encoding() is used
38:  *
39:  * @return string unicode as character sequence in given $encoding
40:  * @author Rodney Rehm
41:  */
42: function smarty_mb_from_unicode($unicode, $encoding = null)
43: {
44:     $t = '';
45:     if (!$encoding) {
46:         $encoding = mb_internal_encoding();
47:     }
48:     foreach ((array) $unicode as $utf32be) {
49:         $character = pack("N*", $utf32be);
50:         $t .= mb_convert_encoding($character, $encoding, "UTF-32BE");
51:     }
52: 
53:     return $t;
54: }
55: 
CMS CONTENIDO 4.9.7 API documentation generated by ApiGen