mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 17:24:07 +02:00
Move to PSR-4 for autoloading
This commit is contained in:
parent
7adbe91c9a
commit
46e2daf1ee
12 changed files with 55 additions and 56 deletions
|
|
@ -6,7 +6,7 @@
|
|||
* See the COPYING-README file.
|
||||
*/
|
||||
|
||||
namespace SMB;
|
||||
namespace Icewind\SMB;
|
||||
|
||||
class Connection extends RawConnection {
|
||||
const DELIMITER = 'smb:';
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
* See the COPYING-README file.
|
||||
*/
|
||||
|
||||
namespace SMB;
|
||||
namespace Icewind\SMB;
|
||||
|
||||
class NotFoundException extends \Exception {
|
||||
}
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
* See the COPYING-README file.
|
||||
*/
|
||||
|
||||
namespace SMB;
|
||||
namespace Icewind\SMB;
|
||||
|
||||
class RawConnection {
|
||||
/**
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
* See the COPYING-README file.
|
||||
*/
|
||||
|
||||
namespace SMB;
|
||||
namespace Icewind\SMB;
|
||||
|
||||
class Server {
|
||||
const CLIENT = 'smbclient';
|
||||
|
|
@ -68,8 +68,8 @@ class Server {
|
|||
|
||||
/**
|
||||
* @return Share[]
|
||||
* @throws \SMB\AuthenticationException
|
||||
* @throws \SMB\InvalidHostException
|
||||
* @throws \Icewind\SMB\AuthenticationException
|
||||
* @throws \Icewind\SMB\InvalidHostException
|
||||
*/
|
||||
public function listShares() {
|
||||
$user = escapeshellarg($this->getUser());
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
* See the COPYING-README file.
|
||||
*/
|
||||
|
||||
namespace SMB;
|
||||
namespace Icewind\SMB;
|
||||
|
||||
class Share {
|
||||
/**
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Copyright (c) 2012 Robin Appelman <icewind@owncloud.com>
|
||||
* This file is licensed under the Affero General Public License version 3 or
|
||||
* later.
|
||||
* See the COPYING-README file.
|
||||
*/
|
||||
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . __DIR__);
|
||||
|
||||
require_once 'errors.php';
|
||||
|
||||
spl_autoload_register(function ($class) {
|
||||
if (substr($class, 0, 4) == 'SMB\\') {
|
||||
$class = strtolower($class);
|
||||
$file = str_replace('\\', '/', substr($class, 4));
|
||||
include __DIR__ . '/' . $file . '.php';
|
||||
}
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue