protected function compileRule(array $rule)
    {
        switch ($rule['type']) {
            case TransformationProcessor::T_MAP:
                return $this->compileMap($rule);

            case TransformationProcessor::T_REPLACE:
                return $this->compileReplace($rule);

            case TransformationProcessor::T_TRANSPOSE:
                return $this->compileTranspose($rule);

            case TransformationProcessor::T_TRANSPOSE_MODULO:
                return $this->compileTransposeModulo($rule);

            default:
                throw new RuntimeException('Unknown rule type: ' . $rule['type']);
        }
    }
protected function compileRule(array $rule)
    {
        switch ($rule['type']) {
            case TransformationProcessor::T_MAP:
                return $this->compileMap($rule);

            case TransformationProcessor::T_REPLACE:
                return $this->compileReplace($rule);

            case TransformationProcessor::T_TRANSPOSE:
                return $this->compileTranspose($rule);

            case TransformationProcessor::T_TRANSPOSE_MODULO:
                return $this->compileTransposeModulo($rule);

            default:
                throw new RuntimeException('Unknown rule type: ' . $rule['type']);
        }
    }
protected function compileRule ( array $ rule ) { switch ( $ rule [ 'type' ] ) { case TransformationProcessor :: T_MAP : return $ this -> compileMap ( $ rule ) ; case TransformationProcessor :: T_REPLACE : return $ this -> compileReplace ( $ rule ) ; case TransformationProcessor :: T_TRANSPOSE : return $ this -> compileTranspose ( $ rule ) ; case TransformationProcessor :: T_TRANSPOSE_MODULO : return $ this -> compileTransposeModulo ( $ rule ) ; default : throw new RuntimeException ( 'Unknown rule type: ' . $ rule [ 'type' ] ) ; } }
Compiles a single rule.

@param array $rule

@return array
Compiles a single rule .