HEX
Server: Apache
System: Linux WWW 6.1.0-40-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.153-1 (2025-09-20) x86_64
User: web11 (1011)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: /var/www/payments-gateway/vendor/doctrine/orm/src/Query/Expr/From.php
<?php

declare(strict_types=1);

namespace Doctrine\ORM\Query\Expr;

use Stringable;

/**
 * Expression class for DQL from.
 *
 * @link    www.doctrine-project.org
 */
class From implements Stringable
{
    /**
     * @param class-string $from  The class name.
     * @param string       $alias The alias of the class.
     */
    public function __construct(
        protected string $from,
        protected string $alias,
        protected string|null $indexBy = null,
    ) {
    }

    /** @return class-string */
    public function getFrom(): string
    {
        return $this->from;
    }

    public function getAlias(): string
    {
        return $this->alias;
    }

    public function getIndexBy(): string|null
    {
        return $this->indexBy;
    }

    public function __toString(): string
    {
        return $this->from . ' ' . $this->alias .
                ($this->indexBy ? ' INDEX BY ' . $this->indexBy : '');
    }
}