autoloading of Crypt_AES and Crypt_RSA is easier

This commit is contained in:
Mikael Nordfeldth 2015-10-04 15:57:11 +02:00
parent 684b9419a0
commit 4238875ebe
2 changed files with 15 additions and 0 deletions

View File

@ -41,6 +41,7 @@ class LRDDPlugin extends Plugin
return parent::onAutoload($cls);
}
public function onStartDiscoveryMethodRegistration(Discovery $disco) {
$disco->registerMethod('LRDDMethod_WebFinger');
}

View File

@ -83,6 +83,20 @@ class OStatusPlugin extends Plugin
return true;
}
public function onAutoload($cls)
{
switch ($cls) {
case 'Crypt_AES':
case 'Crypt_RSA':
// Crypt_AES becomes Crypt/AES.php which is found in extlib/phpseclib/
// which has been added to our include_path before
require_once str_replace('_', '/', $cls) . '.php';
return false;
}
return parent::onAutoload($cls);
}
/**
* Set up queue handlers for outgoing hub pushes
* @param QueueManager $qm