Skip to content

Instantly share code, notes, and snippets.

View friartuck6000's full-sized avatar

Kyle Tucker friartuck6000

  • Gainesville, FL
View GitHub Profile
@mageekguy
mageekguy / psr4.php
Last active July 8, 2020 19:48
Very simple PSR-4 autoloader
<?php
namespace your\namespace\here;
spl_autoload_register(function($class) {
if (stripos($class, __NAMESPACE__) === 0)
{
@include(__DIR__ . DIRECTORY_SEPARATOR . 'classes' . str_replace('\\', DIRECTORY_SEPARATOR, strtolower(substr($class, strlen(__NAMESPACE__)))) . '.php');
}
}
@lawlesst
lawlesst / VIVO SPARQL Update API
Last active August 30, 2018 20:05
Example of using SPARQLWrapper to update data in VIVO .
Sample scripts for using the VIVO SPARQL Update API in PHP, Python.
https://wiki.duraspace.org/display/VIVO/The+SPARQL+Update+API