nepda/youtrack-client

How to access issue's fields?

andreasciamanna opened this issue · 2 comments

Looking at the code, it seems like the Issue class stores the issue's fields in a protected $attributes property in his base class, using the __set magic method.

However, some fields have spaces in their names and I wonder how I'm supposed to get their values.

I've checked all the examples, as well as the code, and... I'm lost :)

nepda commented

You can use the magic __get method manually.

$issue->__get("My nice attribute (with special chars)");

I should have thought about that. Thanks!