mirror of
https://github.com/nextcloud/documentation.git
synced 2026-01-04 10:46:21 +07:00
added appframework api files
This commit is contained in:
@@ -3,7 +3,7 @@ API abstraction layer
|
||||
|
||||
.. sectionauthor:: Bernhard Posselt <nukeawhale@gmail.com>
|
||||
|
||||
Owncloud currently has a ton of static methods which is a very bad thing concerning testability. Therefore the appframework comes with an API abstraction layer (basically a `facade <http://en.wikipedia.org/wiki/Facade_pattern>`_) which is located in the appframework app at :file:`core/api.php`.
|
||||
ownCloud currently has a ton of static methods which is a very bad thing concerning testability. Therefore the appframework comes with an :php:class:`OCA\\AppFramework\\Core\\API` abstraction layer (basically a `facade <http://en.wikipedia.org/wiki/Facade_pattern>`_) which is located in the appframework app at :file:`core/api.php`.
|
||||
|
||||
If you find yourself in need to use more ownCloud internal static methods, add them to the API class in the appframework directory, like:
|
||||
|
||||
@@ -36,4 +36,3 @@ You could of course also simply inherit from the API class and overwrite the API
|
||||
|
||||
This will allow you to easily mock the API in your unittests.
|
||||
|
||||
.. note:: This will eventually be replaced with an internal Owncloud API layer.
|
||||
|
||||
Reference in New Issue
Block a user