This repository has been archived by the owner on Jun 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Squashed commit of Matthimatiker branch.
Cherrypicked the minor additions as proposed in pull request #308. Close #308. Conflicts: application/controllers/ResourceController.php Original commits: commit 4a3dd0c Author: Matthias Molitor <[email protected]> Date: Sat Mar 22 14:01:44 2014 +0100 removed usage of undeclared properties that are not accessed afterwards commit 28b009e Author: Matthias Molitor <[email protected]> Date: Sat Mar 22 13:54:17 2014 +0100 introduced workaround to avoid storing global objects in the session commit 2be2305 Author: Matthias Molitor <[email protected]> Date: Mon Mar 17 23:06:37 2014 +0100 changed handling of translator and view references to avoid storing the whole view graph in the session whenever a message is added commit db36002 Author: Matthias Molitor <[email protected]> Date: Tue Jan 28 22:02:58 2014 +0100 news feed url is now configurable commit e496127 Author: Matthias Molitor <[email protected]> Date: Tue Jan 28 21:42:27 2014 +0100 added stricter timeout to ensure that the Wiki is usable if the AKSW blog is not reachable commit 5439d73 Author: Matthias Molitor <[email protected]> Date: Tue Jan 28 21:36:48 2014 +0100 refactoring: extracted method; reduced duplicated code commit af17400 Author: Matthias Molitor <[email protected]> Date: Tue Jan 28 21:24:55 2014 +0100 fixed typo commit 333a3aa Author: Matthias Molitor <[email protected]> Date: Mon Jan 27 19:07:33 2014 +0100 use line breaks to improve readability of SPARQL error commit 3734cc2 Author: Matthias Molitor <[email protected]> Date: Mon Jan 27 19:06:27 2014 +0100 escape errors to ensure that they are readable in the browser commit 319fd03 Author: Matthias Molitor <[email protected]> Date: Mon Jan 27 18:56:21 2014 +0100 OntoWiki recommends to disable short open tags, therefore, the templates should not rely on it commit ebb6e38 Author: Matthias Molitor <[email protected]> Date: Mon Jan 27 13:37:55 2014 +0100 fixed query: according to <http://www.w3.org/TR/2013/REC-sparql11-query-20130321/#rSelectClause>, a comma is not allowed between variables commit 03d0a4e Author: Matthias Molitor <[email protected]> Date: Sun Jan 26 16:26:23 2014 +0100 only apply max_execution_time setting if the execution time is increased commit 49ce0e7 Author: Matthias Molitor <[email protected]> Date: Thu Jan 23 17:18:37 2014 +0100 changed parameter retrieval to avoid PHP notices when they do not exist commit 400300f Author: Matthias Molitor <[email protected]> Date: Sun Jan 19 13:43:24 2014 +0100 escaped error text to ensure that messages with for example SPARQL queries are at least readable in the browser commit f4156e1 Author: Matthias Molitor <[email protected]> Date: Sun Jan 19 12:53:10 2014 +0100 introduced optional class loading via Composer
- Loading branch information
1 parent
a43feb7
commit fb18b81
Showing
10 changed files
with
112 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,9 @@ | |
* @copyright Copyright (c) 2012, {@link http://aksw.org AKSW} | ||
* @license http://opensource.org/licenses/gpl-license.php GNU General Public License (GPL) | ||
* @author Norman Heino <[email protected]> | ||
* @property Zend_Log $_logger | ||
* @property Erfurt_Event_Dispatcher $_eventDispatcher | ||
* @property Zend_Config $_config The application configuration. | ||
*/ | ||
class OntoWiki_Model | ||
{ | ||
|
@@ -24,27 +27,13 @@ class OntoWiki_Model | |
*/ | ||
protected $_store = null; | ||
|
||
/** | ||
* The OntoWiki Application config | ||
* | ||
* @var Zend_Config | ||
*/ | ||
protected $_config = null; | ||
|
||
/** | ||
* Whether inference features are turned on | ||
* | ||
* @var boolean | ||
*/ | ||
protected $_inference = true; | ||
|
||
/** | ||
* The Application logger | ||
* | ||
* @var Zend_Log | ||
*/ | ||
protected $_logger = null; | ||
|
||
/** | ||
* Model instance | ||
* | ||
|
@@ -59,23 +48,13 @@ class OntoWiki_Model | |
*/ | ||
protected $_graph = null; | ||
|
||
/** | ||
* The Erfurt event dispatcher | ||
* | ||
* @var Erfurt_Event_Dispatcher | ||
*/ | ||
protected $_eventDispatcher = null; | ||
|
||
/** | ||
* Constructor | ||
*/ | ||
public function __construct(Erfurt_Store $store, Erfurt_Rdf_Model $graph) | ||
{ | ||
// system variables | ||
$this->_store = $store; | ||
$this->_config = OntoWiki::getInstance()->config; | ||
$this->_logger = OntoWiki::getInstance()->logger; | ||
$this->_eventDispatcher = Erfurt_Event_Dispatcher::getInstance(); | ||
|
||
if (isset($this->_config->system->inference) && !(bool)$this->_config->system->inference) { | ||
$this->_inference = false; | ||
|
@@ -110,5 +89,29 @@ public function getGraph() | |
{ | ||
return $this->_model; | ||
} | ||
|
||
/** | ||
* Simulates properties that reference global objects. | ||
* | ||
* The globals are *not* stored as properties of this objects, otherwise | ||
* these globals (and the whole object graph that is connected to them) | ||
* are serialized when this object is stored in the session. | ||
* | ||
* @param string $name | ||
* @return Erfurt_Event_Dispatcher|Zend_Log|Zend_Config|null | ||
*/ | ||
public function __get($name) | ||
{ | ||
switch ($name) { | ||
case '_logger': | ||
return OntoWiki::getInstance()->logger;; | ||
case '_eventDispatcher': | ||
return Erfurt_Event_Dispatcher::getInstance(); | ||
case '_config': | ||
return OntoWiki::getInstance()->config; | ||
} | ||
return null; | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters