Giter VIP home page Giter VIP logo

Comments (4)

xskif avatar xskif commented on August 11, 2024

Update issue

from codecomplice.

wizza-smile avatar wizza-smile commented on August 11, 2024

hey @xskif,

sorry but your mind is playing tricks on you. The following code is the regular expression that is matched against @Property. It hasn't changed from Komodos code:

 _re_magic_property = re.compile(
        r'^\s*@property(-(?P<type>read|write))?\s+((?P<citdl>[\w\\]+)\s+)?(?P<name>\$\w+)(?:\s+(?P<doc>.*?))?', re.M | re.U)

As you can see, the array syntax is not supported, only word-characters and backslash (namespaces) are considered!

So the following is working:

class Order {
    public function orderMethod($value='')
    {
        return true;
    }
}

/**
 * @property Order $order
 */
class User {
    public function getOrder() {
        return $this->hasOne(Order::className(), ['id'=>'id']);
    }
}

$user = new User();
$user->order->(shows "orderMethod")

This is actually a feature request!

from codecomplice.

xskif avatar xskif commented on August 11, 2024

Really? I was pretty sure that this feature already working on. Strange.
Ok, let it be a feature request.

from codecomplice.

xskif avatar xskif commented on August 11, 2024

Because of this "feature" didn't work, i have a bug with autocompletion.

$user->orders[0]->(there is some User class methods, instead of empty completion or Order class methods)

from codecomplice.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.