The trait Idable provides a method equalsId that in turn relies on the
method getId(). If this method does not exist on a class mixing in this
trait, the method will fail.
Adding the getId() as an abstract method to the trait will make sure it
is available.
Loading history...
18
2
return $this->makeCryptKey('private');
19
2
});
20
$this->getContainer()->share('hello.keys.public', function () {
The trait Idable provides a method equalsId that in turn relies on the
method getId(). If this method does not exist on a class mixing in this
trait, the method will fail.
Adding the getId() as an abstract method to the trait will make sure it
is available.
Loading history...
21
2
return $this->makeCryptKey('public');
22
2
});
23
2
}
24
25
/**
26
* @param $return
27
* @return array
28
*/
29
protected function appendCryptKeysToProvide($return)
30
{
31
$return[] = 'hello.keys.private';
32
$return[] = 'hello.keys.public';
33
return $return;
34
}
35
36
/**
37
* Create a CryptKey instance without permissions check
This check looks for methods that are used by a trait but not required by it.
To illustrate, let’s look at the following code example
The trait
Idableprovides a methodequalsIdthat in turn relies on the methodgetId(). If this method does not exist on a class mixing in this trait, the method will fail.Adding the
getId()as an abstract method to the trait will make sure it is available.