Changeset 1760640
- Timestamp:
- 11/08/2017 09:34:13 AM (8 years ago)
- Location:
- fv-community-news/trunk
- Files:
-
- 3 deleted
- 10 edited
-
. (modified) (1 prop)
-
fv-community-news.php (modified) (5 diffs)
-
fvcn-includes/classes/application/Bootstrap.php (deleted)
-
fvcn-includes/classes/application/Config (deleted)
-
fvcn-includes/classes/library/FV/Bootstrap.php (deleted)
-
fvcn-includes/classes/library/FV/Config.php (modified) (1 diff)
-
fvcn-includes/classes/library/FV/Config/Ini.php (modified) (1 diff)
-
fvcn-includes/classes/library/FV/Config/Interface.php (modified) (1 diff)
-
fvcn-includes/classes/library/FV/Config/WordPress.php (modified) (1 diff)
-
fvcn-includes/classes/library/FV/Loader.php (modified) (1 diff)
-
fvcn-includes/classes/library/FV/Loader/AutoLoader.php (modified) (2 diffs)
-
fvcn-includes/classes/library/FV/Loader/Autoloader/Interface.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
fv-community-news/trunk
- Property svn:ignore
-
old new 1 .idea 1 nbproject
-
- Property svn:ignore
-
fv-community-news/trunk/fv-community-news.php
r606779 r1760640 23 23 { 24 24 /** 25 * @var string 26 */ 27 public $version = '3.0.3'; 28 29 /** 30 * @var FvCommunityNews 31 */ 32 private static $_instance; 33 34 /** 25 35 * __construct() 26 36 * … … 30 40 public function __construct() 31 41 { 32 $this->_setupAutoloader(); 42 33 43 } 34 44 … … 82 92 83 93 return $this; 84 }85 86 /**87 * Start the autoloader.88 *89 * @return FvCommunityNews90 */91 protected function _setupAutoloader()92 {93 require_once './fvcn-includes/classes/library/FV/Loader.php';94 require_once './fvcn-includes/classes/library/FV/Loader/Autoloader.php';95 96 $autoloader = new FV_Loader_AutoLoader( new FV_Loader() );97 98 $autoloader->registerNamespace('FvCommunityNews', '../../../application')99 ->register();100 101 return $this;102 94 } 103 95 … … 321 313 return $this; 322 314 } 315 316 317 /** 318 * setInstance() 319 * 320 * @version 20120710 321 * @param FvCommunityNews $instance 322 * @return FvCommunityNews 323 */ 324 public static function setInstance(FvCommunityNews $instance=null) 325 { 326 if (null === self::$_instance) { 327 if (null === $instance) { 328 self::$_instance = new FvCommunityNews(); 329 } else { 330 self::$_instance = $instance; 331 } 332 } 333 } 334 335 /** 336 * getInstance() 337 * 338 * @version 20120710 339 * @return FvCommunityNews 340 */ 341 public static function getInstance() 342 { 343 self::setInstance(); 344 return self::$_instance; 345 } 323 346 } 324 347 … … 329 352 */ 330 353 try { 331 $FvCommunityNews = new FvCommunityNews(); 332 $FvCommunityNews->start(); 354 FvCommunityNews::getInstance()->start(); 333 355 } catch (Exception $e) { 334 356 if (defined('WP_DEBUG') && true === WP_DEBUG) { -
fv-community-news/trunk/fvcn-includes/classes/library/FV/Config.php
r606779 r1760640 32 32 public function set($key, $value) 33 33 { 34 34 35 35 } 36 36 -
fv-community-news/trunk/fvcn-includes/classes/library/FV/Config/Ini.php
r606779 r1760640 50 50 public function set($key, $value) 51 51 { 52 throw new Exception('Ini configuration is read-only'); 52 $this->_config[ $key ] = $value; 53 return $this; 53 54 } 54 55 } -
fv-community-news/trunk/fvcn-includes/classes/library/FV/Config/Interface.php
r606779 r1760640 14 14 */ 15 15 public function get($key); 16 17 /** 18 * Set an option. 19 * 20 * @param string $key 21 * @param mixed $value 22 */ 23 public function set($key, $value); 16 24 } -
fv-community-news/trunk/fvcn-includes/classes/library/FV/Config/WordPress.php
r606779 r1760640 27 27 public function __construct(FV_Config_Interface $default) 28 28 { 29 if ($default instanceof FV_Config_WordPress) {30 throw new Exception('WordPress default config cannot be an instance of FV_Config_WordPress.');31 }32 33 29 $this->_defaultConfig = $default; 34 30 } -
fv-community-news/trunk/fvcn-includes/classes/library/FV/Loader.php
r606779 r1760640 1 1 <?php 2 3 require_once './Loader/Interface.php';4 5 2 6 3 /** -
fv-community-news/trunk/fvcn-includes/classes/library/FV/Loader/AutoLoader.php
r606779 r1760640 1 1 <?php 2 3 require_once './Autoloader/Interface.php';4 5 2 6 3 /** … … 121 118 } 122 119 123 $filename .= ' ./' . str_replace(array('_', '\\'), '/', $className) . '.php';120 $filename .= '/' . str_replace(array('_', '\\'), DIRECTORY_SEPARATOR, $className); 124 121 125 122 return $filename; -
fv-community-news/trunk/fvcn-includes/classes/library/FV/Loader/Autoloader/Interface.php
r606779 r1760640 9 9 { 10 10 /** 11 * Register a namespace.12 *13 * @param string $namespace14 * @param string $location15 * @return \FV_Loader_AutoLoader16 * @throws Exception17 */18 public function registerNamespace($namespace, $location);19 20 /**21 * Register the autoloader.22 *23 * @return \FV_Loader_AutoLoader24 */25 public function register();26 27 /**28 11 * Autoload function. 29 12 * -
fv-community-news/trunk/readme.txt
r1760628 r1760640 2 2 3 3 Contributors: frankverhoeven 4 Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=SB62B7H867Y4C&lc=US&item_name=Frank%20Verhoeven¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted 4 5 Tags: Community News, Community, News, Widget, Custom Post, Custom Posting, Post, Form, Akismet, Ajax 5 6 Requires at least: 3.3
Note: See TracChangeset
for help on using the changeset viewer.