code style
This commit is contained in:
@@ -145,10 +145,9 @@ class Restler extends \Luracast\Restler\Restler
|
|||||||
protected function call()
|
protected function call()
|
||||||
{
|
{
|
||||||
$this->dispatch('call');
|
$this->dispatch('call');
|
||||||
$o = & $this->apiMethodInfo;
|
$o = &$this->apiMethodInfo;
|
||||||
$accessLevel = max(\Luracast\Restler\Defaults::$apiAccessLevel,
|
$accessLevel = max(\Luracast\Restler\Defaults::$apiAccessLevel, $o->accessLevel);
|
||||||
$o->accessLevel);
|
$object = \Luracast\Restler\Scope::get($o->className);
|
||||||
$object = \Luracast\Restler\Scope::get($o->className);
|
|
||||||
switch ($accessLevel) {
|
switch ($accessLevel) {
|
||||||
case 3 : //protected method
|
case 3 : //protected method
|
||||||
$reflectionMethod = new \ReflectionMethod(
|
$reflectionMethod = new \ReflectionMethod(
|
||||||
@@ -175,11 +174,11 @@ class Restler extends \Luracast\Restler\Restler
|
|||||||
{
|
{
|
||||||
$classReflection = new \ReflectionClass($object);
|
$classReflection = new \ReflectionClass($object);
|
||||||
$classShortName = $classReflection->getShortName();
|
$classShortName = $classReflection->getShortName();
|
||||||
$registry = \PMPluginRegistry::getSingleton();
|
$registry = &\PMPluginRegistry::getSingleton();
|
||||||
$pluginsApiExtend = $registry->getExtendsRestService($classShortName);
|
$pluginsApiExtend = $registry->getExtendsRestService($classShortName);
|
||||||
if ($pluginsApiExtend) {
|
if ($pluginsApiExtend) {
|
||||||
$classFilePath = $pluginsApiExtend['filePath'];
|
$classFilePath = $pluginsApiExtend['filePath'];
|
||||||
if(file_exists($classFilePath)) {
|
if (file_exists($classFilePath)) {
|
||||||
require_once($classFilePath);
|
require_once($classFilePath);
|
||||||
$classExtName = $pluginsApiExtend['classExtend'];
|
$classExtName = $pluginsApiExtend['classExtend'];
|
||||||
$newObjectExt = new $classExtName();
|
$newObjectExt = new $classExtName();
|
||||||
|
|||||||
@@ -1472,7 +1472,7 @@ class PMPluginRegistry
|
|||||||
$baseSrcPluginPath = PATH_PLUGINS . $sNamespace . PATH_SEP . "src";
|
$baseSrcPluginPath = PATH_PLUGINS . $sNamespace . PATH_SEP . "src";
|
||||||
$apiPath = PATH_SEP . "Services" . PATH_SEP . "Ext" . PATH_SEP;
|
$apiPath = PATH_SEP . "Services" . PATH_SEP . "Ext" . PATH_SEP;
|
||||||
$classFile = $baseSrcPluginPath . $apiPath . 'Ext' . $className . '.php';
|
$classFile = $baseSrcPluginPath . $apiPath . 'Ext' . $className . '.php';
|
||||||
if(file_exists($classFile)){
|
if (file_exists($classFile)) {
|
||||||
$this->_restExtendServices[$className] = array(
|
$this->_restExtendServices[$className] = array(
|
||||||
"filePath" => $classFile,
|
"filePath" => $classFile,
|
||||||
"classParent" => $className,
|
"classParent" => $className,
|
||||||
|
|||||||
Reference in New Issue
Block a user