private function parseFrom()
    {
        if (!empty($this->parts['from'])) {
            $parts = [];

            foreach ($this->parts['from'] as $key => $item) {
                if (is_array($item)) {
                    $table = isset($item[0]) ? $item[0] : false;
                    $alias = isset($item[1]) ? $item[1] : false;

                    if (is_object($table)) {
                        if (!$alias) {
                            trigger_error('Select statements in for need aliases defined', E_USER_ERROR);
                        }
                        $parts[$key] = '('.$table.') AS '.$this->protect($alias).$this->parseJoin($alias);
                    } else {
                        $parts[$key] = $this->protect($table).' AS '.$this->protect((!empty($alias) ? $alias : $table)).$this->parseJoin($alias);
                    }
                } elseif (!strpos($item, ' ')) {
                    $parts[] = $this->protect($item).$this->parseJoin($item);
                } else {
                    $parts[] = $item;
                }
            }

            return implode(", ", array_unique($parts));
        }

        return null;
    }