Znerol\Component\Stringprep\Profile::map PHP Method

map() protected method

Apply mapping (RFC 3454 section 3)
protected map ( $codepoints )
    protected function map($codepoints)
    {
        if ($this->removeZWS) {
            $codepoints = array_filter($codepoints, 'Znerol\\Component\\Stringprep\\RFC3454\\B_1::filter');
        }
        switch ($this->casefold) {
            case self::CASEFOLD_B_2:
                $codepoints = static::applyMappingTable($codepoints, 'Znerol\\Component\\Stringprep\\RFC3454\\B_2::map');
                break;
            case self::CASEFOLD_B_3:
                $codepoints = static::applyMappingTable($codepoints, 'Znerol\\Component\\Stringprep\\RFC3454\\B_3::map');
                break;
        }
        return $codepoints;
    }

Usage Example

Exemplo n.º 1
0
 /**
  * Apply mapping (RFC 3454 section 3)
  */
 protected function map($codepoints)
 {
     $codepoints = parent::map($codepoints);
     $codepoints = static::applyMappingTable($codepoints, 'static::saslprepMapUnicodeSpaceToSpace');
     return $codepoints;
 }