<?php
namespace Claromentis\Quiz\Repository;

$GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"] ?: array()) + array("_fb181f138b94816d72901c" . "265594bc96" => base64_decode("cXVlc3Rpb25faWQgPSBpbnQ6cXVlc3Rpb" . "25faWQ="), "_8e33effefc261b22c31d16a" . "992d2678c" => base64_decode("U0VMRUNUIHF1ZXN0aW9uX2lkIEZST00gcXVpel9xdWVzdGlvb" . "l9qdW5jdGlvbg=="), "_b3f8b52f21a9daef6c" . "a01e7f18fc132a" => base64_decode("IEF" . "ORC" . "A="), "_0f7321019339ace6ad2e176" . "353d6bf0b" => base64_decode("YXJyYX" . "lfd2Fs" . "aw=="), "_4fafdd456bb36e80" . "51adbdd932b91179" => base64_decode("cXVpel9pZCA9IGludDpxdWl6X" . "2lk"), "_6024bbbed950529201" . "c0eabd4bb5a5b4" => base64_decode("c29ydF9vcmRlciBBU0MsIHF1Z" . "XN0aW9uX2lkIEFTQw=="));
use Claromentis\Core\DAL;
use Claromentis\Core\Event\EventDispatcher;
use Claromentis\Core\Repository\RepositoryItem;
use Claromentis\Quiz\Model;
use Claromentis\Core\Repository\Repository;








class QuizQuestionRepository extends Repository
{
    
    
    
    
    protected $dispatcher;
    
    
    
    
    
    
    
    
    public function __construct(DAL\Db $_e87574de8e606d438c70d60ffb96ef44, RepositoryItem $_b15aac3aa29c10ea6d1228f58cb9a7e8, EventDispatcher $_b497ce6f2af10f67516aed0ecf34d8cf)
    {
        parent::__construct($_e87574de8e606d438c70d60ffb96ef44, $_b15aac3aa29c10ea6d1228f58cb9a7e8);
        $this->dispatcher = $_b497ce6f2af10f67516aed0ecf34d8cf;
    }
    
    
    
    
    
    
    
    
    public function ListJunctions($quiz_id = 0, $question_id = 0)
    {
        $_9961f986823b4be7f5c4cc8379c6b228 = array();
        if ($quiz_id) {
            $_9961f986823b4be7f5c4cc8379c6b228[] = new DAL\QueryPart($GLOBALS["__65da1b1ec2d6653e" . "8a0ab7848e536215"]["_4fafdd456bb36e8051a" . "dbdd932b91179"], $quiz_id);
        }
        if ($question_id) {
            $_9961f986823b4be7f5c4cc8379c6b228[] = new DAL\QueryPart($GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["_fb181f138b94816d72901c26" . "5594bc96"], $question_id);
        }
        $_6fc0a74a25d1fbb4c738bc7d5895bb02 = DAL\QueryBuilder::JoinQueryParts($GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["_b3f8b52f21a9daef6ca01e" . "7f18fc132a"], $_9961f986823b4be7f5c4cc8379c6b228);
        $_7bd2e327358b9118697fb22256c36b61 = new DAL\QueryPart($_6fc0a74a25d1fbb4c738bc7d5895bb02);
        $_03e9164d0a343b742df4793268b80767 = DAL\QueryBuilder::BindQueryParts($_7bd2e327358b9118697fb22256c36b61, $_9961f986823b4be7f5c4cc8379c6b228);
        return $this->GetObjects($_03e9164d0a343b742df4793268b80767, $GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["_6024bbbed" . "950529201c" . "0eabd4bb5a" . "5b4"]);
    }
    
    
    
    
    
    
    public function GetQuestionIds($quiz_id)
    {
        $_30f942154645a3deca356c5cbdef7313 = new DAL\QueryBuilder($GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_8e33effefc261b2" . "2c31d16a992d2678" . "c"]);
        $_30f942154645a3deca356c5cbdef7313->AddWhereAndClause($GLOBALS["__65da1b1ec2d6653e8a0ab784" . "8e536215"]["_4fafdd456bb36e80" . "51adbdd932b91179"], $quiz_id);
        $_b4af1f7aa1ccde1a449e9d8afe15b753 = $this->db->query($_30f942154645a3deca356c5cbdef7313->GetQuery());
        
        
        $_d69bc5256e082f5dee25c2438a6ddc93 = $_b4af1f7aa1ccde1a449e9d8afe15b753->fetchAllValues();
        $GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_0f7321019339ace6ad2e1" . "76353d6bf0b"]($_d69bc5256e082f5dee25c2438a6ddc93, function (&$_71f6a5b5840d77d6f5700b8129d32c14) {
            $_71f6a5b5840d77d6f5700b8129d32c14 = (int) $_71f6a5b5840d77d6f5700b8129d32c14;
        });
        return $_d69bc5256e082f5dee25c2438a6ddc93;
    }
    
    
    
    
    
    
    public function NewObject()
    {
        return parent::NewObject();
    }
}