@@ 326-334 (lines=9) @@ | ||
323 | * @param string $dependency |
|
324 | * @return bool |
|
325 | */ |
|
326 | public function has_dependency_for_class($class_name = '', $dependency = '') |
|
327 | { |
|
328 | // all legacy models have the same dependencies |
|
329 | if (strpos($class_name, 'EEM_') === 0) { |
|
330 | $class_name = 'LEGACY_MODELS'; |
|
331 | } |
|
332 | $dependency = $this->getFqnForAlias($dependency, $class_name); |
|
333 | return isset($this->_dependency_map[ $class_name ][ $dependency ]); |
|
334 | } |
|
335 | ||
336 | ||
337 | /** |
|
@@ 344-354 (lines=11) @@ | ||
341 | * @param string $dependency |
|
342 | * @return int |
|
343 | */ |
|
344 | public function loading_strategy_for_class_dependency($class_name = '', $dependency = '') |
|
345 | { |
|
346 | // all legacy models have the same dependencies |
|
347 | if (strpos($class_name, 'EEM_') === 0) { |
|
348 | $class_name = 'LEGACY_MODELS'; |
|
349 | } |
|
350 | $dependency = $this->getFqnForAlias($dependency); |
|
351 | return $this->has_dependency_for_class($class_name, $dependency) |
|
352 | ? $this->_dependency_map[ $class_name ][ $dependency ] |
|
353 | : EE_Dependency_Map::not_registered; |
|
354 | } |
|
355 | ||
356 | ||
357 | /** |