Replace is_a() and is_subclass_of() with instanceof

This commit is contained in:
Kijin Sung 2016-02-11 09:57:08 +09:00
parent bc06367edf
commit 80f2dd7a8a
3 changed files with 4 additions and 4 deletions

View file

@ -619,7 +619,7 @@ class DB
$output = include($cache_file);
if((is_a($output, 'Object') || is_subclass_of($output, 'Object')) && !$output->toBool())
if($output instanceof Object && !$output->toBool())
{
return $output;
}
@ -652,7 +652,7 @@ class DB
{
$output = $this->getError();
}
else if(!is_a($output, 'Object') && !is_subclass_of($output, 'Object'))
elseif(!($output instanceof Object))
{
$output = new Object();
}

View file

@ -164,7 +164,7 @@ class ModuleInstaller
}
$output = $oModule->moduleUninstall();
if(is_subclass_of($output, 'Object') && !$output->toBool())
if($output instanceof Object && !$output->toBool())
{
return $output;
}

View file

@ -60,7 +60,7 @@ class editorController extends editor
if(method_exists($oComponent, $method)) $output = $oComponent->{$method}();
else return new Object(-1,sprintf('%s method is not exists', $method));
if((is_a($output, 'Object') || is_subclass_of($output, 'Object')) && !$output->toBool()) return $output;
if($output instanceof Object && !$output->toBool()) return $output;
$this->setError($oComponent->getError());
$this->setMessage($oComponent->getMessage());