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: /*
 4:  * This file is part of SwiftMailer.
 5:  * (c) 2004-2009 Chris Corbyn
 6:  *
 7:  * For the full copyright and license information, please view the LICENSE
 8:  * file that was distributed with this source code.
 9:  */
10: 
11: /**
12:  * Analyzes US-ASCII characters.
13:  * @package Swift
14:  * @subpackage Encoder
15:  * @author Chris Corbyn
16:  */
17: class Swift_CharacterReader_UsAsciiReader implements Swift_CharacterReader
18: {
19:     /**
20:      * Returns the complete charactermap
21:      *
22:      * @param string $string
23:      * @param int    $startOffset
24:      * @param string $ignoredChars
25:      */
26:     public function getCharPositions($string, $startOffset, &$currentMap, &$ignoredChars)
27:     {
28:         $strlen=strlen($string);
29:         $ignoredChars='';
30:         for ($i = 0; $i < $strlen; ++$i) {
31:             if ($string[$i]>"\x07F") { // Invalid char
32:                 $currentMap[$i+$startOffset]=$string[$i];
33:             }
34:         }
35: 
36:         return $strlen;
37:     }
38: 
39:     /**
40:      * Returns mapType
41:      * @return int mapType
42:      */
43:     public function getMapType()
44:     {
45:         return self::MAP_TYPE_INVALID;
46:     }
47: 
48:     /**
49:      * Returns an integer which specifies how many more bytes to read.
50:      * A positive integer indicates the number of more bytes to fetch before invoking
51:      * this method again.
52:      * A value of zero means this is already a valid character.
53:      * A value of -1 means this cannot possibly be a valid character.
54:      * @param  string $bytes
55:      * @return int
56:      */
57:     public function validateByteSequence($bytes, $size)
58:     {
59:         $byte = reset($bytes);
60:         if (1 == count($bytes) && $byte >= 0x00 && $byte <= 0x7F) {
61:             return 0;
62:         } else {
63:             return -1;
64:         }
65:     }
66: 
67:     /**
68:      * Returns the number of bytes which should be read to start each character.
69:      * @return int
70:      */
71:     public function getInitialByteSize()
72:     {
73:         return 1;
74:     }
75: }
76: 
CMS CONTENIDO 4.9.7 API documentation generated by ApiGen