Answer the question
In order to leave comments, you need to log in
Is it worth specifying dependencies for relays in ActiveRecord in UML?
Hello.
A simple example. I did not describe the connection, but I think you will understand.
We pull all countries ... we do something.
All areas for the country ... we are doing something.
All cities for the region ... we are doing something.
class SampleClass
{
public function doAnything()
{
foreach(Country::find()->all() as $Country) {
// some code here ...
foreach($Country->locations as $Location) {
// some code here ...
foreach($Location->cities as $City) {
// some code here ...
}
}
}
}
}
class Country extends ActiveRecord
{
}
class Location extends ActiveRecord
{
}
class City extends ActiveRecord
{
}
Answer the question
In order to leave comments, you need to log in
1. What does Yii have to do with it? After all a question especially on UML?
2. Why do you need this diagram, if not to show the relationship?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question