PHPCompiler\Backend\PHP7\PECL::compileZppDecl PHP Method

compileZppDecl() protected method

protected compileZppDecl ( $param )
    protected function compileZppDecl($param)
    {
        $name = $this->getVarName($param->result);
        switch ($this->mapToCType($param->result->type)) {
            case 'HashTable*':
                return "Z_PARAM_ARRAY_HT({$name})";
            case 'zend_string*':
                return "Z_PARAM_STR({$name})";
            case 'zend_long':
                return "Z_PARAM_LONG({$name})";
            case 'double':
                return "Z_PARAM_DOUBLE({$name})";
            case 'zend_bool':
                return "Z_PARAM_BOOL({$name})";
            case 'zval':
                return "Z_PARAM_ZVAL(&{$name})";
        }
        throw new \RuntimeException("Unknown ZPP type found for {$param->result}->type");
    }