Gets post comments.

@param array $arguments

@return \Illuminate\Support\Collection
334939
public function getComments(array $arguments)
    {
        $model = App::make(CommentModel::class);

        return $model->make('comment')->query($arguments);
    }
411605
public function GetComments($ActivityIDs) {
      $Result = $this->SQL
         ->Select('c.*')
         ->From('ActivityComment c')
         ->WhereIn('c.ActivityID', $ActivityIDs)
         ->OrderBy('c.ActivityID, c.DateInserted')
         ->Get()->ResultArray();
      Gdn::UserModel()->JoinUsers($Result, array('InsertUserID'), array('Join' => array('Name', 'Photo', 'Email')));
      return $Result;
   }
250936
public function posts($posttype = null, $arguments = [])
    {
        return $this->model->postsWith($this, $posttype, $arguments);
    }
156229
private function getDefinitionsFromArguments(array $arguments)
    {
        $definitions = array();
        foreach ($arguments as $argument) {
            if (is_array($argument)) {
                $definitions = array_merge($definitions, $this->getDefinitionsFromArguments($argument));
            } elseif ($argument instanceof Definition) {
                $definitions = array_merge(
                    $definitions,
                    $this->getInlinedDefinitions($argument),
                    array($argument)
                );
            }
        }

        return $definitions;
    }
89920
public function query(...$arguments) // don't define return type, so user can
    {
        $query       = $arguments[0] ?? '';
        $queryParams = $arguments[1] ?? null;

        try {
            return $this->vendor->getDatabase()->getLink()->getAgent()->query($query, $queryParams);
        } catch (\Exception $e) {
            $this->setFail($e);
            return null;
        }
    }
770265
public function getComments($ip = null)
    {
        $app = App::getInstance();

        $comments = (new CommentManager())
            ->filter("article = %i", array($this->getId()))
            ->filter("active = 1")
            ->filter("spam = 0 ")
            ->values();

        $comments = is_null($comments) ? array() : $comments;

        return $comments;
    }
931044
public function get( $arg ) {
		$comment_id = (int) $arg;
		$comment    = get_comment( $comment_id );

		if ( null === $comment ) {
			return false;
		}

		return $comment;
	}
1029485
public function GetAll($q, $arguments = [])
    {
        if (!is_array($arguments)) {
            $arguments = [$arguments]; // adodb backward compatibility
        }

        return $this->fetchAll($q, $arguments);
    }
433489
public function get($commentId, array $params = array())
    {
        $endpoint = '/admin/comments/'.$commentId.'.json';
        $response = $this->request($endpoint);
        return $this->createObject(Comment::class, $response['comment']);
    }
770073
public function getComment()
    {
        $postParameterBag = $this
            ->request
            ->query;
        $commentId = $postParameterBag->get('comment_id');
    
        if (empty($commentId)) {
            return new JsonResponse([
                'status' => 'Error',
                'message' => 'Some query parameters are missing',
            ], 400);
        }

        $commentReference = new CommentUUID($commentId);
        $comment = $this
            ->commentRepository
            ->findComment($commentReference)
            ->getFirstComment();
    
        if (!$comment instanceof Comment) {
            return new JsonResponse([
                'status' => 'Error',
                'message' => 'Comment not found',
            ], 404);
        }
        
    
        return new JsonResponse([
            'comment' => $comment->toArray(),
            'user' => $this->userCredentialsProvider->toArray(),
        ], 200);
    }
1195913
public function query(): array
    {
        $comments = Comment::with([
            'post' => function ($query) {
                $query->select('id', 'type', 'slug');
            },
        ])->latest()
            ->paginate();

        return [
            'comments' => $comments,
        ];
    }
216094
private function collection($args = null) {

        static $data = [];


        if(isset($args[1])) {
            
            if(preg_match('/(.*)\[(.*)\]/', $args[0], $matches)) {

                $data[$matches[1]][$matches[2]] = $args[1];

            } else {

                $data[$args[0]] = $args[1];

                return $args[1];
            }
        }

        return $data;
    }
792783
public function addArguments(array $arguments)
    {
        foreach ($arguments as $param => $value) {
            $this->addArgument($param, $value);
        }

        return $this;
    }
587911
private function processArguments(array $arguments)
    {
        foreach ($arguments as $k => $argument) {
            if (is_array($argument)) {
                $arguments[$k] = $this->processArguments($argument);
            } elseif ($argument instanceof Reference) {
                $defId = $this->getDefinitionId($id = (string) $argument);

                if ($defId !== $id) {
                    $arguments[$k] = new Reference($defId, $argument->getInvalidBehavior());
                }
            }
        }

        return $arguments;
    }
471475
public function getCommentsBefore(array $options = array()) {
		$options['wheres'][] = "
			e.time_created < {$this->comment->time_created}
		";
		$options['order_by'] = 'e.time_created ASC';
		$comments = elgg_get_entities_from_metadata($this->getFilterOptions($options));
		if (is_array($comments)) {
			return array_reverse($comments);
		}
		return $comments;
	}
777962
protected function getCommentSections()
    {
        if (empty($this->commentSections) && $this->rawComment) {
            $this->commentSections = explode("\n\n", $this->rawComment);
        }

        return $this->commentSections;
    }
36812
protected function arguments(array $arguments = null)
    {
        return is_null($arguments)
            ? $this->arguments
            : ($this->arguments = $arguments);
    }