/** * Construct * * @param array $record */ public function __construct(array $record) { $this->orgId = $record['orgid']; $this->deptId = $record['deptid']; $this->deptName = $record['deptname']; $this->parentId = !empty($record['parentid']) ? $record['parentid'] : null; $this->orderNum = $record['ordernum']; $this->moderators = Dao_Md_Department_Department::formatModerator($record['moderators']); $this->firstNode = isset($record['firstnode']) && $record['firstnode'] ? true : false; $this->lastNode = isset($record['lastnode']) && $record['lastnode'] ? true : false; $this->depth = isset($record['depth']) ? $this->_toInt($record['depth']) : null; $this->prefix = !empty($record['prefix']) ? $record['prefix'] : null; $this->path = isset($record['path']) ? $record['path'] : array(); parent::__construct(); }