<commit_before><?php

class Model_Loan_Article {
    private $_id, $_loan, $_article, $_begindate, $_enddate;
    private static $_manager;


    function __construct($id = null) {
        self::init();
        if(is_null($id)) {
            $this->_id = null;
            $this->_loan = null;
            $this->_article = null;
            $this->_begindate = null;
            $this->_enddate = null;
        }
        else {
            $loanArticle = self::$_manager->getLoanArticle($id);
            $this->_id = $loanArticle['id'];
            $this->_loan = $loanArticle['loan'];
            $this->_article = $loanArticle['article'];
            $this->_begindate = $loanArticle['begindate'];
            $this->_enddate = $loanArticle['enddate'];
        }
        
    }

    public static function init() {
        if(!is_object(self::$_manager)) self::$_manager = new Pdo_Loan_Article();
    }
    
    public function getId() {
        return $this->_id;
    }

    public function setId($id) {
        $this->_id = $id;
    }

    public function getLoan() {
        return $this->_loan;
    }

    public function setLoan($loan) {
        $this->_loan = $loan;
    }

    public function getArticle() {
        return $this->_article;
    }

    public function setArticle($article) {
        $this->_article = $article;
    }

    public function getBegindate() {
        return $this->_begindate;
    }

    public function setBegindate($begindate) {
        $this->_begindate = $begindate;
    }

    public function getEnddate() {
        return $this->_enddate;
    }

    public function setEnddate($enddate) {
        $this->_enddate = $enddate;
    }

}

?><commit_msg>Ajout des méthodes de gestion de la quantité sur la classe Model_Loan_Article<commit_after><?php

class Model_Loan_Article {
    private $_id, $_loan, $_article, $_quantity, $_begindate, $_enddate;
    private static $_manager;


    function __construct($id = null) {
        self::init();
        if(is_null($id)) {
            $this->_id = null;
            $this->_loan = null;
            $this->_article = null;
            $this->_begindate = null;
            $this->_enddate = null;
        }
        else {
            $loanArticle = self::$_manager->getLoanArticle($id);
            $this->_id = $loanArticle['id'];
            $this->_loan = $loanArticle['loan'];
            $this->_article = $loanArticle['article'];
            $this->_begindate = $loanArticle['begindate'];
            $this->_enddate = $loanArticle['enddate'];
        }
        
    }

    public static function init() {
        if(!is_object(self::$_manager)) self::$_manager = new Pdo_Loan_Article();
    }
    
    public function getId() {
        return $this->_id;
    }

    public function setId($id) {
        $this->_id = $id;
    }

    public function getLoan() {
        return $this->_loan;
    }

    public function setLoan($loan) {
        $this->_loan = $loan;
    }

    public function getArticle() {
        return $this->_article;
    }

    public function setArticle($article) {
        $this->_article = $article;
    }
    
    public function getQuantity() {
        return $this->_quantity;
    }
    
    public function setQuantity($quantity) {
        $this->_quantity = $quantity;
    }

    public function getBegindate() {
        return $this->_begindate;
    }

    public function setBegindate($begindate) {
        $this->_begindate = $begindate;
    }

    public function getEnddate() {
        return $this->_enddate;
    }

    public function setEnddate($enddate) {
        $this->_enddate = $enddate;
    }

}

?>
{'fraction_non_alphanumeric': 0.13833883388338833, 'fraction_numerical': 0.0, 'mean_word_length': 2.0511744966442955, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 49, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2337321', 'n_tokens_mistral': 1180, 'n_tokens_neox': 1088, 'n_words': 218}