Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/NextcloudApiWrapper/NextCloudVersion14/AppsClient.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

namespace NextcloudApiWrapper\NextCloudVersion14;

class AppsClient extends \NextcloudApiWrapper\AbstractClient
{

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

namespace NextcloudApiWrapper\NextCloudVersion14;

class FederatedCloudSharesClient extends \NextcloudApiWrapper\AbstractClient
{

}
8 changes: 8 additions & 0 deletions src/NextcloudApiWrapper/NextCloudVersion14/GroupsClient.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

namespace NextcloudApiWrapper\NextCloudVersion14;

class GroupsClient extends \NextcloudApiWrapper\AbstractClient
{

}
8 changes: 8 additions & 0 deletions src/NextcloudApiWrapper/NextCloudVersion14/SharesClient.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

namespace NextcloudApiWrapper\NextCloudVersion14;

class SharesClient extends \NextcloudApiWrapper\AbstractClient
{

}
44 changes: 44 additions & 0 deletions src/NextcloudApiWrapper/NextCloudVersion14/UsersClient.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?php

namespace NextcloudApiWrapper\NextCloudVersion14;

use \NextcloudApiWrapper\Connection;
use \NextcloudApiWrapper\NextcloudResponse;

class UsersClient extends \NextcloudApiWrapper\UsersClient
{

/**
* Adds a user.
* @param $username
* @param $password
* @param string $displayName
* @param string $email
* @param array $groups
* @param array $subadmin
* @param string $quota
* @param string $language
* @return NextcloudResponse
*/
public function addUser($username,
$password,
$displayName = '',
$email = '',
$groups = [],
$subadmin = [],
$quota = '',
$language = '')
{

return $this->connection->submitRequest(Connection::POST, self::USER_PART, [
'userid' => $username,
'password' => $password,
'displayName' => $displayName,
'email' => $email,
'groups' => $groups,
'subadmin' => $subadmin,
'quota' => $quota,
'language' => $language
]);
}
}
22 changes: 22 additions & 0 deletions src/NextcloudApiWrapper/NextCloudVersion14/Wrapper.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

namespace NextcloudApiWrapper\NextCloudVersion14;

use \NextcloudApiWrapper\Connection;

class Wrapper extends \NextcloudApiWrapper\Wrapper
{

public function __construct(Connection $connection)
{
parent::__construct($connection);
}

/**
* @return UsersClient
*/
public function getUsersClient() {

return $this->getClient(UsersClient::class);
}
}
4 changes: 2 additions & 2 deletions src/NextcloudApiWrapper/Wrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ class Wrapper
*/
protected $clients = [];

private function __construct(Connection $connection)
public function __construct(Connection $connection)
{
$this->connection = $connection;
}

public static function build($baseUri, $username, $password) {

$connection = new Connection($baseUri, $username, $password);
return new Wrapper($connection);
return new static($connection);
}

/**
Expand Down