PluginProbe
CSS & JavaScript Toolbox / 8.0.3
CSS & JavaScript Toolbox v8.0.3
trunk 0.3 0.8 10 10.1 11 11.2 11.3 11.4 11.5 11.6 11.7 11.8 11.9 11.9.1 12 12.0 12.0.1 12.0.3 12.0.4 12.0.5 12.0.6 12.0.7 6.0 6.0.11 All 60 releases
← All changes | framework/access-points/directory-spider.class.php +17 -29 6.08.0.3 View file →
@@ -11,13 +11,8 @@
11 11 */
12 12 class CJTAccessPointsDirectorySpider extends ArrayIterator {
13 13
14 14 /**
15 - *
16 - */
17 - const CACHE_POINTER = 'settings.CJTAccessPointsDirectorySpider.cache';
18 -
19 - /**
20 15 * put your comment there...
21 16 *
22 17 * @var mixed
23 18 */
@@ -65,32 +60,25 @@
65 60
66 61 /**
67 62 * put your comment there...
68 63 *
69 - * @param mixed $reload
70 - * @return CJTAccessPointsDirectorySpider
71 - * @todo Set realod = false when released!
64 + * @return CJTAccessPointsDirectorySpider Returns $this.
72 65 */
73 - protected function load($reload = false) {
74 - // Get if cached and not force reload!
75 - if (!($this->aPoints = get_option(self::CACHE_POINTER)) || $reload) {
76 - // Reset access points!
77 - $this->aPoints =array();
78 - // Get all defined ap inside the specified directory!
79 - $accessPoints = new DirectoryIterator($this->dir);
80 - foreach ($accessPoints as $file) {
81 - if (!$file->isDir()) {
82 - // Build point info!
83 - $point = array();
84 - $point['file'] = $file->getFilename();
85 - $point['name'] = $file->getBaseName('.accesspoint.php');
86 - $point['class'] = "{$this->prefix}{$point['name']}AccessPoint";
87 - // Add to points list!
88 - $this->aPoints[$point['name']] = $point;
89 - }
90 - }
91 - // Update the cache;
92 - update_option(self::CACHE_POINTER, $this->aPoints);
66 + protected function load() {
67 + // Reset access points!
68 + $this->aPoints =array();
69 + // Get all defined ap inside the specified directory!
70 + $accessPoints = new DirectoryIterator($this->dir);
71 + foreach ($accessPoints as $file) {
72 + if (!$file->isDir()) {
73 + // Build point info!
74 + $point = array();
75 + $point['file'] = $file->getFilename();
76 + $point['name'] = $file->getBaseName('.accesspoint.php');
77 + $point['class'] = "{$this->prefix}{$point['name']}AccessPoint";
78 + // Add to points list!
79 + $this->aPoints[$point['name']] = $point;
80 + }
93 81 }
94 82 return $this;
95 83 }
96 84
@@ -103,9 +91,9 @@
103 91 $point =& $this[$this->key()];
104 92 // Full absolulte path to access point file!
105 93 $absPath = "{$this->dir}/{$point['file']}";
106 94 // Instantiate point class, this will put it in action!
107 - require_once $absPath;
95 + include_once $absPath;
108 96 return new $point['class']();
109 97 }
110 98
111 99 } // End class.