/** * * @param string $managerId * @return Manager */ public static function getCopyByManagerId($managerId) { $rs = static::loopFindRecords(array('accountId' => $managerId)); if (!empty($rs)) { return parent::getCopy($rs[0]['loginname'], $rs[0]['camefrom']); } else { throw new \Sooh\Base\ErrException('manager not found'); } }
protected function setAccountStorage($accountId) { $this->account = \Sooh\DB\Cases\AccountStorage::getCopy($accountId); }