E
E
EVOSandru62016-06-17 06:11:45
Yii
EVOSandru6, 2016-06-17 06:11:45

How to get the name of the called heir class in Yii ActiveRecord?

I tried this:
$class = lcfirst(get_class($this->owner));
in the bottom of the methods.
I catch:
Property " Roles.owner " is not defined.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Elena Stepanova, 2016-06-17
@EVOSandru6

owner - this is in behaviors, and so - as usual in php php.net/manual/ru/function.get-called-class.php
php.net/manual/vote-note.php?id=71064&page=languag...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question