A
A
atis //2016-11-03 15:02:14
Yii
atis //, 2016-11-03 15:02:14

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
{

}

Is it necessary to indicate on the UML diagram the dependence of the SamleClass class on Location and City ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2016-11-03
@webinar

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 question

Ask a Question

731 491 924 answers to any question