Skip to content

Checking for __get magic function #2

Description

@fabpot

I have objects with a few 'virtual' properties that are handled by the _ _get and _ _set magic functions. Twig doesn't check for this if i use something like {{ foo.bar }}.
According to the manual:

* check if foo is an array and bar a valid element;
* if not, and if foo is an object, check that bar is a valid property;
* if not, and if foo is an object, check that bar is a valid method;
* if not, and if foo is an object, check that getBar is a valid method;
* if not, return a null value. 

I would like to see "if not, and if foo is an object, check that _ _get is a valid method and bar is returned by it" to this list.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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