<?php
namespace Claromentis\Quiz\Repository;

$GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"] ?: array()) + array("_b3f8b52f21a9daef6ca01e" . "7f18fc132a" => base64_decode("IEFORC" . "A="), "_6024bbbed950529201c0ea" . "bd4bb5a5b4" => base64_decode("c29ydF9vcmRlciBBU0MsIHF" . "1ZXN0aW9uX2lkIEFTQw=="), "_fb181f138b94816d72901c2655" . "94bc96" => base64_decode("cXVlc3Rpb25faWQgPSBpbnQ6cXVlc3Rpb25f" . "aWQ="), "_4fafdd456bb36e" . "8051adbdd932b91" . "179" => base64_decode("cXVpel9pZCA9I" . "GludDpxdWl6X2" . "lk"), "_0f7321019339ace6ad" . "2e176353d6bf0b" => base64_decode("YXJyYXlfd2" . "Fsaw=="), "_8e33effefc261b22c3" . "1d16a992d2678c" => base64_decode("U0VMRUNUIHF1ZXN0aW9uX2lkIEZST00gcXVpel9xdWVzdGlvbl9q" . "dW5jdGlvbg=="));
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["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_4fafdd4" . "56bb36e8" . "051adbdd" . "932b9117" . "9"], $quiz_id);
        }
        if ($question_id) {
            $_9961f986823b4be7f5c4cc8379c6b228[] = new DAL\QueryPart($GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"]["_fb181f138b94816" . "d72901c265594bc9" . "6"], $question_id);
        }
        $_6fc0a74a25d1fbb4c738bc7d5895bb02 = DAL\QueryBuilder::JoinQueryParts($GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["_b3f8b52f21a9daef6ca01" . "e7f18fc132a"], $_9961f986823b4be7f5c4cc8379c6b228);
        $_7bd2e327358b9118697fb22256c36b61 = new DAL\QueryPart($_6fc0a74a25d1fbb4c738bc7d5895bb02);
        $_03e9164d0a343b742df4793268b80767 = DAL\QueryBuilder::BindQueryParts($_7bd2e327358b9118697fb22256c36b61, $_9961f986823b4be7f5c4cc8379c6b228);
        return $this->GetObjects($_03e9164d0a343b742df4793268b80767, $GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"]["_6024bbbed950529201c0eabd4" . "bb5a5b4"]);
    }
    
    
    
    
    
    
    public function GetQuestionIds($quiz_id)
    {
        $_30f942154645a3deca356c5cbdef7313 = new DAL\QueryBuilder($GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"]["_8e33effefc261b22c31d16a992d" . "2678c"]);
        $_30f942154645a3deca356c5cbdef7313->AddWhereAndClause($GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["_4fafdd456b" . "b36e8051adb" . "dd932b91179"], $quiz_id);
        $_b4af1f7aa1ccde1a449e9d8afe15b753 = $this->db->query($_30f942154645a3deca356c5cbdef7313->GetQuery());
        
        
        $_d69bc5256e082f5dee25c2438a6ddc93 = $_b4af1f7aa1ccde1a449e9d8afe15b753->fetchAllValues();
        $GLOBALS["__65da1b1ec2d6653e8a0a" . "b7848e536215"]["_0f7321019339ace6ad2e176353d" . "6bf0b"]($_d69bc5256e082f5dee25c2438a6ddc93, function (&$_71f6a5b5840d77d6f5700b8129d32c14) {
            $_71f6a5b5840d77d6f5700b8129d32c14 = (int) $_71f6a5b5840d77d6f5700b8129d32c14;
        });
        return $_d69bc5256e082f5dee25c2438a6ddc93;
    }
    
    
    
    
    
    
    public function NewObject()
    {
        return parent::NewObject();
    }
}