Data Structures | Enumerations | Functions | Variables

Services/Utilities/classes/class.ilMWParserAdapter.php File Reference

Go to the source code of this file.

Data Structures

class  ilMWFakery
class  ilMWParserAdapter

Enumerations

enum  UTF8_REPLACEMENT

Functions

if(!function_exists("wfProfileIn"))
if(!function_exists("wfProfileOut")) 
codepointToUtf8 ($codepoint)
 wfUrlProtocols ()
 Returns a regular expression of url protocols.

Variables

 $GLOBALS ["wgContLang"] = new ilMWFakery()

Enumeration Type Documentation

Definition at line 34 of file class.ilMWParserAdapter.php.


Function Documentation

if (!function_exists("wfProfileIn")) if (!function_exists("wfProfileOut")) codepointToUtf8 ( codepoint  ) 

Definition at line 17 of file class.ilMWParserAdapter.php.

                                       {
        if($codepoint <         0x80) return chr($codepoint);
        if($codepoint <    0x800) return chr($codepoint >>      6 & 0x3f | 0xc0) .
                                                                         chr($codepoint           & 0x3f | 0x80);
        if($codepoint <  0x10000) return chr($codepoint >> 12 & 0x0f | 0xe0) .
                                                                         chr($codepoint >>      6 & 0x3f | 0x80) .
                                                                         chr($codepoint           & 0x3f | 0x80);
        if($codepoint < 0x110000) return chr($codepoint >> 18 & 0x07 | 0xf0) .
                                                                         chr($codepoint >> 12 & 0x3f | 0x80) .
                                                                         chr($codepoint >>      6 & 0x3f | 0x80) .
                                                                         chr($codepoint           & 0x3f | 0x80);

        echo "Asked for code outside of range ($codepoint)\n";
        die( -1 );
}

wfUrlProtocols (  ) 

Returns a regular expression of url protocols.

Returns:
string

Definition at line 41 of file class.ilMWParserAdapter.php.

                          {
        global $wgUrlProtocols;
        
        $wgUrlProtocols = array(
                'http://',
                'https://',
                'ftp://',
                'irc://',
                'gopher://',
                'telnet://', // Well if we're going to support the above.. -ævar
                'nntp://', // @bug 3808 RFC 1738
                'worldwind://',
                'mailto:',
                'news:'
                );


        // Support old-style $wgUrlProtocols strings, for backwards compatibility
        // with LocalSettings files from 1.5
        if ( is_array( $wgUrlProtocols ) ) {
                $protocols = array();
                foreach ($wgUrlProtocols as $protocol)
                        $protocols[] = preg_quote( $protocol, '/' );

                return implode( '|', $protocols );
        } else {
                return $wgUrlProtocols;
        }
}


Variable Documentation

$GLOBALS["wgContLang"] = new ilMWFakery()

Definition at line 112 of file class.ilMWParserAdapter.php.