Opencart yeni Model Class

fofotara

OpenCart-TR
Katılım
24 Kas 2011
Mesajlar
79
Tepkime puanı
0
Puanları
0
Opencart yeni Model Class
Merhaba, öncelikle konuyu açtığım yer yanlış ise özür dilerim. Yeni bir mödül yapma aşamasındayım. Deneme yanılma ile bir yere kadar gelebildim. Ancal Model class yapılarında __construct metodun da kaldım.

PHP Kod:
PHP:
class GmailOath {

    public $oauth_consumer_key;
    public $oauth_consumer_secret;
    public $progname;
    public $debug;
    public $callback;

    function __construct($consumer_key, $consumer_secret, $argarray, $debug, $callback) {
        $this->oauth_consumer_key = $consumer_key;
        $this->oauth_consumer_secret = $consumer_secret;
        $this->progname = $argarray;
        $this->debug = $debug; // Set to 1 for verbose debugging output
        $this->callback = $callback;
    }
}

şu yapıyı bir türlü extends model class a çeviremedim.

function __construct yapısını bir türlü bulamadım.

Birde configorusyon classım var . bu düzgün çalışıyor

PHP:
PHP Kod:
<?php
class ModelInviterConf extends Model {
    
    public function consumer_key(){
            $consumer_key='7425234552777.apps.googleusercontent.com';
        return $consumer_key;
    }
        
    public function consumer_secret(){
            $consumer_secret='AV32WZTfkN4tUq8AXwNIyxfA4';
        return $consumer_secret;        
    }
        
    public function callback(){
            $callback='http://aptaladam.com.com/gmail/Contacts.php';    
        return $callback;
    }
    
    public function emails_count(){
            $emails_count='500';
        return $emails_count;
    }
    
    }

?>

En son geldiğim nokta


PHP:
PHP Kod:
public function __construct($registry) {
    
    
    
        $this->oauth_consumer_key = "";
       $this->oauth_consumer_secret = "";
       $this->progname = "";
       $this->debug = ""; // Set to 1 for verbose debugging output
       $this->callback = "";
        
        }

Ancak burda conf classını buraya load ile çağıramıyorum.
---- $this->load->model('inviter/conf'); ---

izlemem gereken yol nedir. Yardım ederseniz sevinirim.
 
Üst