Your ROOT_URL in app.ini is https://code.exacti.com.br/ but you are visiting https://git.exacti.com.br/ExacTI/phacil-framework/blame/commit/7c38d178a03634470e84f68db857b6e51915040a/system/magiql/Builder/Syntax/AbstractSetWriter.php You should set ROOT_URL correctly, otherwise the web may not work correctly.
A super easy PHP Framework for web development! https://github.com/exacti/phacil-framework

50 lines
1.1 KiB

<?php
/**
* Copyright © 2023 ExacTI Technology Solutions. All rights reserved.
* GPLv3 General License.
* https://exacti.com.br
* Phacil PHP Framework - https://github.com/exacti/phacil-framework
*/
namespace Phacil\Framework\MagiQL\Builder\Syntax;
use \Phacil\Framework\MagiQL\Api\BuilderInterface;
use Phacil\Framework\MagiQL\Api\Syntax\QueryPartInterface;
/**
* Class AbstractSetWriter.
*/
abstract class AbstractSetWriter
{
/**
* @var BuilderInterface
*/
protected $writer;
/**
* @param \Phacil\Framework\MagiQL\Api\BuilderInterface $writer
*/
public function __construct(BuilderInterface $writer)
{
$this->writer = $writer;
}
/**
* @param QueryPartInterface $setClass
* @param string $setOperation
* @param $glue
*
* @return string
*/
protected function abstractWrite(QueryPartInterface $setClass, $setOperation, $glue)
{
$selects = [];
foreach ($setClass->$setOperation() as $select) {
$selects[] = $this->writer->write($select, false);
}
return \implode("\n".$glue."\n", $selects);
}
}