From 599f1b68712159b5636bdf92521df324d57ce6a8 Mon Sep 17 00:00:00 2001 From: Antonio de la Rosa Date: Thu, 28 May 2015 03:46:52 +0200 Subject: [PATCH] Fixes --- src/Webmodel.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/Webmodel.php b/src/Webmodel.php index aba02e0..c2b1158 100644 --- a/src/Webmodel.php +++ b/src/Webmodel.php @@ -82,6 +82,12 @@ class Webmodel { static public $cache_model=array(); + /** + * Array for check if a extension was loaded. + */ + + static public $cache_extension=array(); + /** * * With this property, you can define what is the server connection that you have to use for read the source data. @@ -1375,7 +1381,13 @@ class Webmodel { public function __call($name_method, $arguments) { - include(__DIR__.'/../extensions/'.$name_method.'.php'); + if(!isset(Webmodel::$cache_extension[$name_method])) + { + + include(__DIR__.'/../extensions/'.$name_method.'.php'); + + Webmodel::$cache_extension[$name_method]=1; + } array_unshift($arguments, $this);