Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

improvements to combiner

  • Loading branch information...
commit 697cc7d8ae46ff062ba0c16dae81cb79a9e8cdbb 1 parent 3d3338b
@kaviththiranga authored
Showing with 31 additions and 0 deletions.
  1. +31 −0 libraries/joomla/media/combiner.php
View
31 libraries/joomla/media/combiner.php
@@ -93,6 +93,18 @@ public function setSources($files =array())
}
/**
+ * Method to get source files
+ *
+ * @return array Source File
+ *
+ * @since 12.1
+ */
+ public function getSources()
+ {
+ return $this->sources;
+ }
+
+ /**
* Method to get combined string
*
* @return String Combined String
@@ -201,6 +213,11 @@ public static function getInstance( $options = array())
// Set the new combinerr to the global instances based on signature.
self::$instances[$signature] = $instance;
}
+ else
+ {
+ $instance = self::$instances[$signature];
+ $instance->clear();
+ }
return self::$instances[$signature];
}
@@ -291,4 +308,18 @@ public static function isSupported($sourceFile)
return true;
}
+
+ /**
+ * Method to clear combiner data
+ *
+ * @return void
+ *
+ * @since 12.1
+ */
+ public function clear()
+ {
+ $this->sources = array();
+ $this->sourceCount = 0;
+ $this->_combined = null;
+ }
}
Please sign in to comment.
Something went wrong with that request. Please try again.