PHPExcel_Shared
[ class tree: PHPExcel_Shared ] [ index: PHPExcel_Shared ] [ all elements ]

Class: PHPExcel_Shared_String

Source Location: /PHPExcel/Shared/String.php

Class Overview


PHPExcel_Shared_String


Author(s):

Copyright:

  • Copyright (c) 2006 - 2009 PHPExcel (http://www.codeplex.com/PHPExcel)

Variables

Methods



Class Details

[line 36]
PHPExcel_Shared_String

PHPExcel_Shared_String




Tags:

copyright:  Copyright (c) 2006 - 2009 PHPExcel (http://www.codeplex.com/PHPExcel)


[ Top ]


Class Variables

static $_controlCharacters = array()

[line 43]

Control characters array

Control characters array




Tags:

access:  private

Type:   string[]


[ Top ]

static $_isIconvEnabled =

[line 57]

Is iconv extension avalable?

Is iconv extension avalable?




Tags:

access:  private

Type:   boolean


[ Top ]

static $_isMbstringEnabled =

[line 50]

Is mbstring extension avalable?

Is mbstring extension avalable?




Tags:

access:  private

Type:   boolean


[ Top ]



Class Methods


static method ControlCharacterOOXML2PHP [line 120]

static string ControlCharacterOOXML2PHP( [string $value = ''])

Convert from OpenXML escaped control character to PHP control character Excel 2007 team: ---------------- That's correct, control characters are stored directly in the shared-strings table.

Convert from OpenXML escaped control character to PHP control character Excel 2007 team: ---------------- That's correct, control characters are stored directly in the shared-strings table. We do encode characters that cannot be represented in XML using the following escape sequence: _xHHHH_ where H represents a hexadecimal character in the character's value... So you could end up with something like _x0008_ in a string (either in a cell value (<v>) element or in the shared string <t> element.




Tags:

access:  public


Parameters:

string   $value   Value to unescape

[ Top ]

static method ControlCharacterPHP2OOXML [line 142]

static string ControlCharacterPHP2OOXML( [string $value = ''])

Convert from PHP control character to OpenXML escaped control character Excel 2007 team: ---------------- That's correct, control characters are stored directly in the shared-strings table.

Convert from PHP control character to OpenXML escaped control character Excel 2007 team: ---------------- That's correct, control characters are stored directly in the shared-strings table. We do encode characters that cannot be represented in XML using the following escape sequence: _xHHHH_ where H represents a hexadecimal character in the character's value... So you could end up with something like _x0008_ in a string (either in a cell value (<v>) element or in the shared string <t> element.




Tags:

access:  public


Parameters:

string   $value   Value to escape

[ Top ]

static method ConvertEncoding [line 256]

static string ConvertEncoding( string $value, string $to, string $from)

Convert string from one encoding to another.

Convert string from one encoding to another. First try mbstring, then iconv, or no convertion




Tags:

access:  public


Parameters:

string   $value  
string   $to   Encoding to convert to, e.g. 'UTF-8'
string   $from   Encoding to convert from, e.g. 'UTF-16LE'

[ Top ]

static method CountCharacters [line 279]

static int CountCharacters( string $value, [string $enc = 'UTF-8'])

Get character count.

Get character count. First try mbstring, then iconv, finally strlen




Tags:

return:  Character count
access:  public


Parameters:

string   $value  
string   $enc   Encoding

[ Top ]

static method FormatNumber [line 189]

static string FormatNumber( mixed $value)

Formats a numeric value as a string for output in various output writers forcing point as decimal separator in case locale is other than English.

Formats a numeric value as a string for output in various output writers forcing point as decimal separator in case locale is other than English.




Tags:

access:  public


Parameters:

mixed   $value  

[ Top ]

static method getIsIconvEnabled [line 94]

static boolean getIsIconvEnabled( )

Get whether iconv extension is available

Get whether iconv extension is available




Tags:

access:  public


[ Top ]

static method getIsMbstringEnabled [line 77]

static boolean getIsMbstringEnabled( )

Get whether mbstring extension is available

Get whether mbstring extension is available




Tags:

access:  public


[ Top ]

static method IsUTF8 [line 178]

static boolean IsUTF8( [string $value = ''])

Check if a string contains UTF8 data

Check if a string contains UTF8 data




Tags:

access:  public


Parameters:

string   $value  

[ Top ]

static method SanitizeUTF8 [line 156]

static string SanitizeUTF8( string $value)

Try to sanitize UTF8, stripping invalid byte sequences.

Try to sanitize UTF8, stripping invalid byte sequences. Not perfect. Does not surrogate characters.




Tags:

access:  public


Parameters:

string   $value  

[ Top ]

static method Substring [line 304]

static string Substring( [string $pValue = ''], [ $pStart = 0], [ $pLength = 0], int $start, int $length)

Get a substring of a UTF-8 encoded string

Get a substring of a UTF-8 encoded string




Tags:

access:  public


Parameters:

string   $pValue   UTF-8 encoded string
int   $start   Start offset
int   $length   Maximum number of characters in substring
   $pStart  
   $pLength  

[ Top ]

static method UTF8toBIFF8UnicodeLong [line 232]

static string UTF8toBIFF8UnicodeLong( string $value)

Converts a UTF-8 string into BIFF8 Unicode string data (16-bit string length)

Converts a UTF-8 string into BIFF8 Unicode string data (16-bit string length) Writes the string using uncompressed notation, no rich text, no Asian phonetics If mbstring extension is not available, ASCII is assumed, and compressed notation is used although this will give wrong results for non-ASCII strings see OpenOffice.org's Documentation of the Microsoft Excel File Format, sect. 2.5.3




Tags:

access:  public


Parameters:

string   $value   UTF-8 encoded string

[ Top ]

static method UTF8toBIFF8UnicodeShort [line 206]

static string UTF8toBIFF8UnicodeShort( string $value)

Converts a UTF-8 string into BIFF8 Unicode string data (8-bit string length)

Converts a UTF-8 string into BIFF8 Unicode string data (8-bit string length) Writes the string using uncompressed notation, no rich text, no Asian phonetics If mbstring extension is not available, ASCII is assumed, and compressed notation is used although this will give wrong results for non-ASCII strings see OpenOffice.org's Documentation of the Microsoft Excel File Format, sect. 2.5.3




Tags:

access:  public


Parameters:

string   $value   UTF-8 encoded string

[ Top ]

static method _buildControlCharacters [line 62]

static void _buildControlCharacters( )

Build control characters array

Build control characters array




Tags:

access:  private


[ Top ]


Documentation generated on Mon, 10 Aug 2009 08:08:04 +0200 by phpDocumentor 1.4.1