Imbo\Storage\Doctrine::getField PHP Метод

getField() приватный Метод

Fetch a field from the image table
private getField ( string $user, string $imageIdentifier, string $field )
$user string The user which the image belongs to
$imageIdentifier string The image identifier
$field string The field to fetch
    private function getField($user, $imageIdentifier, $field)
    {
        $query = $this->getConnection()->createQueryBuilder();
        $query->select($field)->from($this->getTableName($user, $imageIdentifier), 'i')->where('user = :user')->andWhere('imageIdentifier = :imageIdentifier')->setParameters([':user' => $user, ':imageIdentifier' => $imageIdentifier]);
        $stmt = $query->execute();
        $row = $stmt->fetch();
        if (!$row) {
            throw new StorageException('File not found', 404);
        }
        return $row[$field];
    }