sifophp / SIFO

PHP Framework with "project inheritance", multiple DB support, balancing, Sphinx, Memcached, Redis and other stuff
Other
56 stars 21 forks source link

Remove direct includes of files #52

Closed alombarte closed 10 years ago

alombarte commented 10 years ago

All Sifo code should be cleaned of "require", "require_once", "include", or "include_once".

Some examples (list uncomplete)

Sifo//API/Twitter.php:include ROOT_PATH . '/libs/EpiClasses/EpiCurl.php';
Sifo//API/Youtube.php:include ROOT_PATH . '/libs/EpiClasses/EpiCurl.php';
Sifo//Database.php:include_once 'LoadBalancer.php';
Sifo//Database.php:                     include_once( ROOT_PATH . "/libs/$version/adodb-exceptions.inc.php" ); //include exceptions for php5
Sifo//Database.php:                     include_once( ROOT_PATH . "/libs/$version/adodb.inc.php" );
Sifo//Debug/Mysql.php:include_once ROOT_PATH . '/libs/Sifo/Mysql.php';
Sifo//I18N.php:                 include_once ROOT_PATH . '/libs/' . Config::getInstance()->getLibrary( 'googleTranslate' ) . '/googleTranslate.class.php';
Sifo//I18N.php:                 include_once ROOT_PATH . '/libs/' . Config::getInstance()->getLibrary( 'googleTranslate' ) . '/googleTranslate.class.php';
Sifo//Images.php:               include_once ROOT_PATH . '/libs/' . Config::getInstance()->getLibrary( 'phpthumb' ) . '/ThumbLib.inc.php';
Sifo//Images.php:               include_once ROOT_PATH . '/libs/' . Config::getInstance()->getLibrary( 'phpthumb' ) . '/ThumbLib.inc.php';
Sifo//Mail.php:         include_once ROOT_PATH . '/libs/' . Config::getInstance()->getLibrary( 'phpmailer' ) .'/class.phpmailer.php';
Sifo//RedisModel.php:include_once ROOT_PATH . '/libs/' . Config::getInstance()->getLibrary( 'predis' ) . '/lib/Predis/Autoloader.php';
Sifo//View.php:include_once ROOT_PATH . '/libs/'. Config::getInstance()->getLibrary( 'smarty' ).'/Smarty.class.php';
lombartec commented 10 years ago

Should we leave a comment just to have a reference of which class was included there to use it later with namespaces?

alexgt9 commented 10 years ago

No, comments are useless for that. El 31/01/2014 18:04, "Carlos Lombarte" notifications@github.com escribió:

Should we leave a comment just to have a reference of which class was included there to use it later with namespaces?

Reply to this email directly or view it on GitHubhttps://github.com/sifophp/SIFO/issues/52#issuecomment-33820869 .

lombartec commented 10 years ago

Well now that I think it better, a better approach would be to document it in the wiki, what do you think @alexgt9 ?

alexgt9 commented 10 years ago

I think that there is no need to do that. The class names will be the anyway El 31/01/2014 18:16, "Carlos Lombarte" notifications@github.com escribió:

Well now that I think it better, a better approach would be to document it in the wiki, what do you think @alexgt9 https://github.com/alexgt9 ?

Reply to this email directly or view it on GitHubhttps://github.com/sifophp/SIFO/issues/52#issuecomment-33822023 .

lombartec commented 10 years ago

Commit here 70cd5ad :smile:

I left include and inculde_once in the following files