forked from thybag/PHP-SharePoint-Lists-API
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSharePointAPI.php
More file actions
26 lines (24 loc) · 767 Bytes
/
SharePointAPI.php
File metadata and controls
26 lines (24 loc) · 767 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
/**
* SharepointAPI
*
* Simple PHP API for reading/writing and modifying SharePoint list items.
*
* @version 0.6.4
* @licence MIT License
* @source: http://github.com/thybag/PHP-SharePoint-Lists-API
*
*
* Add backwards compatability for none composer users:
* Include this file and add `use Thybag\SharePointAPI;` below in order the PHP SP API as before.
*/
// PSR-0 Autoloader
// see: http://zaemis.blogspot.fr/2012/05/writing-minimal-psr-0-autoloader.html
spl_autoload_register(function ($classname) {
$classname = ltrim($classname, "\\");
preg_match('/^(.+)?([^\\\\]+)$/U', $classname, $match);
$classname = 'src/'.str_replace("\\", "/", $match[1])
. str_replace(array("\\", "_"), "/", $match[2])
. ".php";
include_once $classname;
});