• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CodeIgniter : Loading interface <resolve>

#1
[eluser]pisio[/eluser]
Open :
./system/core/Common.php
add :
Code:
if (!function_exists('loadInterface')) {

function loadInterface($fileName) {
$file = VORTEX_INTERFACE . $fileName . EXT;

if (!file_exists($file)) {
log_message('error', 'There is no interface :[' . $file . ']');
} else {
include_once $file;
}
}

}
Open :
./application/config/constants.php

add:
Code:
define('VORTEX_INTERFACE',APPPATH.'interfaces/');

Create folder "interfaces" in "application" folder and load ....

Code:
loadInterface('VortexInterface');
class VortexCi implements VortexInterface { ...... }



It's not very smart and clean , but for now its work :}


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.