Skip to content

Commit 89e2eac

Browse files
authored
Merge pull request #31447 from nextcloud/doc/manager-interface
Clarify that some interface are not meant to be implemented
2 parents e96c859 + 5a17415 commit 89e2eac

5 files changed

Lines changed: 37 additions & 3 deletions

File tree

lib/public/DB/IPreparedStatement.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,15 @@
3030
use PDO;
3131

3232
/**
33+
* This interface allows you to prepare a database query.
34+
*
35+
* This interface must not be implemented in your application but
36+
* instead obtained from IDBConnection::prepare.
37+
*
38+
* ```php
39+
* $prepare = $this->db->prepare($query->getSql());
40+
* ```
41+
*
3342
* @since 21.0.0
3443
*/
3544
interface IPreparedStatement {

lib/public/DB/IResult.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,18 @@
2929
use PDO;
3030

3131
/**
32+
* This interface represents the result of a database query.
33+
*
34+
* Usage:
35+
*
36+
* ```php
37+
* $qb = $this->db->getQueryBuilder();
38+
* $qb->select(...);
39+
* $result = $query->executeQuery();
40+
* ```
41+
*
42+
* This interface must not be implemented in your application.
43+
*
3244
* @since 21.0.0
3345
*/
3446
interface IResult {

lib/public/DB/ISchemaWrapper.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,12 @@
2626
use Doctrine\DBAL\Platforms\AbstractPlatform;
2727

2828
/**
29-
* Interface ISchemaWrapper
29+
* This interface allows to get information about the database schema.
30+
* This is particularly helpful for database migration scripts.
31+
*
32+
* This interface must not be implemented in your application but
33+
* instead can be obtained in your migration scripts with the
34+
* `$schemaClosure` Closure.
3035
*
3136
* @since 13.0.0
3237
*/

lib/public/Share/IManager.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@
3737
use OCP\Share\Exceptions\ShareNotFound;
3838

3939
/**
40-
* Interface IManager
40+
* This interface allows to manage sharing files between users and groups.
41+
*
42+
* This interface must not be implemented in your application but
43+
* instead should be used as a service and injected in your code with
44+
* dependency injection.
4145
*
4246
* @since 9.0.0
4347
*/

lib/public/UserStatus/IManager.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@
2626
namespace OCP\UserStatus;
2727

2828
/**
29-
* Interface IManager
29+
* This interface allows to manage the user status.
30+
*
31+
* This interface must not be implemented in your application but
32+
* instead should be used as a service and injected in your code with
33+
* dependency injection.
3034
*
3135
* @since 20.0.0
3236
*/

0 commit comments

Comments
 (0)