/** * 返回一个完整的树 * * @param bool $scope 只返回指定的scope * @return MPTT[] */ public function fullTree($scope = null) { $result = new self(); if (!is_null($scope)) { $result->where($this->_scopeColumn, '=', $scope); } else { $result->orderBy($this->_scopeColumn, 'ASC')->orderBy($this->_leftColumn, 'ASC'); } return $result->findAll(); }