PATH:
home
/
letacommog
/
letaweb
/
admin
/
classes
/
components
<?php class paymentComponent extends CComponent { public $variables= array(); public function __get($name) { return $this->variables[$name]; } public function __set($name,$value) { $this->variables[$name] = $value; } public function init() { $path = ('site_app.classes.payments'); if(!file_exists(Yii::getPathofAlias($path))) { $path = ('application.classes.payments'); } Yii::import($path.'.*'); } public function __construct() { $this->init(); //$this->loadModules(); } public function loadModules($is_active = false) { $load_modules = array(); $path = ('site_app.classes.payments'); if(!file_exists(Yii::getPathofAlias($path))) { $path = ('application.classes.payments'); } Yii::import($path.'.*'); foreach(glob(Yii::getPathofAlias($path). DIRECTORY_SEPARATOR.'*.inc.php') as $file) { $filename = basename($file); $module_id = str_replace('.inc.php', '',$filename); if($is_active) { $payment = $this->getModule($module_id); if(isset($payment) && $payment->isActive()) { $load_modules[] = $module_id; } } else $load_modules[] = $module_id; } return $load_modules; } public function getModule($type) { $className = $type."Payment"; $path = ('site_app.classes.payments'); if(!file_exists(Yii::getPathofAlias($path))) { $path = ('application.classes.payments'); } include_once Yii::getPathofAlias($path).DIRECTORY_SEPARATOR.$type.'.inc.php'; if (class_exists($className)) { return new $className($this->variables); } } }
[+]
..
[-] colorComponent.php
[edit]
[-] authorizationComponent.php
[edit]
[-] hostingComponent.php
[edit]
[-] configComponent.php
[edit]
[-] siteComponent.php
[edit]
[-] urlComponent.php
[edit]
[-] paymentComponent.php
[edit]
[-] authManager.php
[edit]
[-] guestComponent.php
[edit]
[-] cmsComponent.php
[edit]
[-] languageComponent.php
[edit]
[-] contextComponent.php
[edit]
[-] cartComponent.php
[edit]
[-] customerComponent.php
[edit]