Reputation: 31934
If I have the classes:
class ClassA
{
private $data;
public function GetData()
{
ClassB::ConvertData($this->data);
}
}
class ClassB
{
public static function ConvertData($data)
{
// Do something with data
return $data;
}
}
... then what is the relation between ClassA
and ClassB
called? The way I see it is not a composition, since ClassA
has no object instance of ClassB
, but still uses one of its methods. I'm leaning towards believing this is a dependency, but ClassA
receives no instance of ClassB
- neither through a constructor nor a method.
Some additional, but related questions:
Thanks for reading, I'd greatly appreciate your help. Just for some clarification, I attempted multiple searches for this, but I'm not sure on how I might search for this on the www.
Upvotes: 1
Views: 45
Reputation: 8145
...Call is a usage dependency that specifies that the source operation invokes the target operation...
Call is denoted with the standard stereotype
«call»
whose source is an operation and whose target is also an operation.This relationship may also be applied to the class containing an operation, with the meaning that there exists an operation in the class to which the dependency applies...
Upvotes: 1