src/IrcConnection.php
public function handleCapabilities(
        \Erebot\Interfaces\EventHandler $handler,
        \Erebot\Event\ServerCapabilities $event
    ) {
        $module = $event->getModule();
        $validMappings  = array(
            // This is already the default value, but we still define it
            // in case setCollator() was called to change the default.
            'rfc1459'           => '\\Erebot\\IrcCollator\\RFC1459',
            'strict-rfc1459'    => '\\Erebot\\IrcCollator\\StrictRFC1459',
            'ascii'             => '\\Erebot\\IrcCollator\\ASCII',
        );
        $caseMapping    = strtolower($module->getCaseMapping());
        if (in_array($caseMapping, array_keys($validMappings))) {
            $cls = $validMappings[$caseMapping];
            $this->collator = new $cls();
        }
    }
public function handleCapabilities(
        \Erebot\Interfaces\EventHandler $handler,
        \Erebot\Event\ServerCapabilities $event
    ) {
        $module = $event->getModule();
        $validMappings  = array(
            // This is already the default value, but we still define it
            // in case setCollator() was called to change the default.
            'rfc1459'           => '\\Erebot\\IrcCollator\\RFC1459',
            'strict-rfc1459'    => '\\Erebot\\IrcCollator\\StrictRFC1459',
            'ascii'             => '\\Erebot\\IrcCollator\\ASCII',
        );
        $caseMapping    = strtolower($module->getCaseMapping());
        if (in_array($caseMapping, array_keys($validMappings))) {
            $cls = $validMappings[$caseMapping];
            $this->collator = new $cls();
        }
    }
public function handleCapabilities ( \ Erebot \ Interfaces \ EventHandler $ handler , \ Erebot \ Event \ ServerCapabilities $ event ) { $ module = $ event -> getModule ( ) ; $ validMappings = array ( // This is already the default value, but we still define it // in case setCollator() was called to change the default. 'rfc1459' => '\\Erebot\\IrcCollator\\RFC1459' , 'strict-rfc1459' => '\\Erebot\\IrcCollator\\StrictRFC1459' , 'ascii' => '\\Erebot\\IrcCollator\\ASCII' , ) ; $ caseMapping = strtolower ( $ module -> getCaseMapping ( ) ) ; if ( in_array ( $ caseMapping , array_keys ( $ validMappings ) ) ) { $ cls = $ validMappings [ $ caseMapping ] ; $ this -> collator = new $ cls ( ) ; } }
Handles the "ServerCapabilities" event.

\param Erebot::Interfaces::EventHandler $handler
The event handler responsible for calling
this method.

\param Erebot::Event::ServerCapabilities $event
The "ServerCapabilities" event to process.
Handles the ServerCapabilities event .