Commit Graph

28 Commits

Author SHA1 Message Date
Bernhard Posselt a4e3939204 add registerAlias method to shorcut interface registration
remove unused import

add since tag

fix typo
2015-07-18 13:43:54 +02:00
Morris Jobke f63915d0c8 update license headers and authors 2015-06-25 14:13:49 +02:00
Robin McCorkell 04b6f67f07 Allow multiple whitespace in type hints in AppFramework
Type hints such as `@param bool     $doSomething` will now correctly get
parsed, allowing for alignment of docblock parameters if the app developer so
wishes.
2015-06-20 23:52:01 +01:00
Joas Schilling 6da9e1a742 Fix visibility of public API methods 2015-04-20 12:52:40 +02:00
Jenkins for ownCloud b585d87d9d Update license headers 2015-03-26 11:44:36 +01:00
Morris Jobke 06aef4e8b1 Revert "Updating license headers"
This reverts commit 6a1a4880f0.
2015-02-26 11:37:37 +01:00
Bernhard Posselt 8176032176 Merge pull request #14427 from owncloud/fix-some-php-docs
Fix some PHPDocs
2015-02-23 14:04:35 +01:00
Lukas Reschke c06a94ecc2 Fix some PHPDocs 2015-02-23 12:19:52 +01:00
Jenkins for ownCloud 6a1a4880f0 Updating license headers 2015-02-23 12:13:59 +01:00
Bernhard Posselt f195123765 Intelligent container
* resolves dependencies by type hint or variable name
* simpler route.php
* implementation of https://github.com/owncloud/core/issues/12829

Generates and injects parameters automatically. You can now build full classes like

    $c->query('MyClassName')

without having to register it as a service. The resolved object's instance will be saved by using registerService. If a constructor parameter is not type hinted, the parameter name will be taken.

Therefore the following two implementations are identical:

    class Class1 { function __construct(MyClassName $class)
    class Class1 { function __construct($MyClassName)

This makes it possible to also inject primitive values such as strings, arrays etc.

In addition if the query could not be resolved, a `QueryException` is now thrown

Routes can now be returned as an array from `routes.php` and an `appinfo/application.php` is optional

Old commit messages:

make it possible to return the routes instead of having to intialize the application
try to get the controller by convention
add first implementation of automatic resolve
add another test just to be sure
store the resolved object
more tests
add phpdoc to public app.php method
use the same variable for the public app.php method
deprecate old methods and add services for public interfaces
deprecated getServer method
disallow private api injection for apps other than core or settings (settings should be an app goddamnit :D)
register userid because its such an often used variable
fix indention and leading slash
use test namespace
add deprecation reasons, remove private api usage checks and remove deprecation from getServer()
add additional public interfaces
add public interface for rootfolder
fix syntax error
remove deprecation from methods where no alternative is there yet
remove deprecated from method which has no alternative
add timezone public service for #12881
add another deprecation hint
move deprecation into separate branch
remove dead comment
first try to get the namespace from the info.xml, if it does not exist, just uppercase the first letter
also trim the namespace name
add an interface for timefactory
move timefactory to public and add icontrollermethodreflector
keep core interface
fix copyright date in headers
2014-12-23 09:50:42 +01:00
Bernhard Posselt ba03b0b843 add an interface for the timefactory class
fix indention
2014-12-20 15:53:31 +01:00
Olivier Paroz 469fd3b3a3 Olivier Paroz \OCP\AppFramework\Utility\IControllerMethodReflector 2014-12-14 23:54:31 +01:00
Philipp Knechtges 768aea57d3 make regex in controllermethodreflector.php compatible with PCRE 6.x
The syntax ?<...> seems to be only supported from PCRE 7.0 on. For
backwards-compability ?P<...> is used.
2014-12-14 10:52:21 +01:00
Bernhard Posselt 6d5a239abf Fix Pimple unset 2014-11-11 22:04:46 +01:00
Thomas Müller 994768d99f Update Pimple to V3.0 2014-11-03 16:57:16 +01:00
Lukas Reschke be06937e65 Use mixed as type
Actually query() returns value of the type "mixed" (as is also stated in the interface) - this is purely there to make our IDEs and Scrutinizer happier.
2014-10-22 15:09:33 +02:00
Morris Jobke 676fa459d7 Minor fixes
* instanceof \OC\Files\View
* fix misplaced paranthesis
* remove misplaced character in comment
2014-08-05 16:53:28 +02:00
Vincent Petry 4e4c2b04c8 Fixed array_combine for PHP 5.3 2014-06-11 19:13:49 +02:00
Bernhard Posselt a152e320f6 make it possible to omit parameters and use the default parameters from the controller method 2014-05-13 10:40:49 +02:00
Bernhard Posselt 474b8f071d Fix typo 2014-05-11 17:54:09 +02:00
Bernhard Posselt fcb1aa36f0 default to null to not fail if type is not annotated via phpdoc 2014-05-11 17:54:09 +02:00
Bernhard Posselt 1d45239c65 adjust license headers to new mail address 2014-05-11 17:54:08 +02:00
Bernhard Posselt 80648da431 implement most of the basic stuff that was suggested in #8290 2014-05-11 17:54:08 +02:00
Thomas Müller 6935364b33 add class Pimple to autloader 2014-04-28 20:57:44 +02:00
Bernhard Posselt 526100dc90 be nice and use a relative import so people can use the class without firing up owncloud 2014-04-12 01:33:21 +02:00
Jörn Friedrich Dreyer 2a6a9a8cef polish documentation based on scrutinizer patches 2014-02-06 17:02:21 +01:00
Adam Williamson 9b4a827e0b don't specify path to 3rdparty directory when registering Pimple autoloader
The core 3rdparty directory is in the include_path from lib/base.php anyway, so this is unnecessary, and causes problems for downstream distributors who unbundle Pimple.
2014-01-01 09:52:19 -08:00
Thomas Müller 9c9dc276b7 move the private namespace OC into lib/private - OCP will stay in lib/public
Conflicts:
	lib/private/vcategories.php
2013-09-30 16:36:59 +02:00