/** * Picks the role with given code. * * @param string $code * * @return array * * @throws NonExistentCodeInternalException */ public function pick($code) { $role = $this->connectToStorageInternalWorker->findOne($code); if (!$role) { throw new NonExistentCodeInternalException($code); } return $role; }
/** * Collects roles. * * @return array */ public function collect() { return $this->connectToStorageInternalWorker->find(); }