| @@ 69-85 (lines=17) @@ | ||
| 66 | return $associations; |
|
| 67 | } |
|
| 68 | ||
| 69 | public function getRelations() |
|
| 70 | { |
|
| 71 | $classNames = array_keys($this->relations); |
|
| 72 | ||
| 73 | $associations = []; |
|
| 74 | ||
| 75 | foreach ($classNames as $class) { |
|
| 76 | $rawAssoc = $this->getRelationsByClass($class); |
|
| 77 | foreach ($rawAssoc as $raw) { |
|
| 78 | if (!in_array($raw, $associations)) { |
|
| 79 | $associations[] = $raw; |
|
| 80 | } |
|
| 81 | } |
|
| 82 | } |
|
| 83 | ||
| 84 | return $associations; |
|
| 85 | } |
|
| 86 | ||
| 87 | /** |
|
| 88 | * @param $className |
|
| @@ 141-155 (lines=15) @@ | ||
| 138 | return $results; |
|
| 139 | } |
|
| 140 | ||
| 141 | public function getRelations() |
|
| 142 | { |
|
| 143 | $results = []; |
|
| 144 | $registered = array_keys($this->relations); |
|
| 145 | ||
| 146 | foreach ($registered as $className) { |
|
| 147 | $lines = $this->getRelationsByClass($className); |
|
| 148 | foreach ($lines as $line) { |
|
| 149 | if (!in_array($line, $results)) { |
|
| 150 | $results[] = $line; |
|
| 151 | } |
|
| 152 | } |
|
| 153 | } |
|
| 154 | return $results; |
|
| 155 | } |
|
| 156 | ||
| 157 | public function hasClass($className) |
|
| 158 | { |
|