Skip to content

loadMethodTable doesn't allow extending of PDOStatement #178

@killes

Description

@killes

I have the following code and try to run it in hphpi:

class DatabaseStatementBase extends PDOStatement implements DatabaseStatementInterface {
...

}

1st problem: There is no rowCount() method in there. PHP doesn't mind that, but hphpi complains.

If I implement the method to overcome the problem I get to:

2nd problem:

Access level to __construct must be public or weaker (as in class PDOStatement)

this is from loadMethodTable in src/runtime/eval/ast/class_statement.cpp.

If I change the access level to public I get

PDOException: SQLSTATE[HY000]: General error: user-supplied statement
class cannot have a public constructor in main() (line
of )

So probably loadMethodTable needs to be changed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions