mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
44 lines
1.4 KiB
PHP
44 lines
1.4 KiB
PHP
<?php
|
|
/**
|
|
* @class editor
|
|
* @author zero (zero@nzeo.com)
|
|
* @brief editor 모듈의 controller class
|
|
**/
|
|
|
|
class editorController extends editor {
|
|
|
|
/**
|
|
* @brief 초기화
|
|
**/
|
|
function init() {
|
|
}
|
|
|
|
|
|
/**
|
|
* @brief 컴포넌트에서 ajax요청시 해당 컴포넌트의 method를 실행
|
|
**/
|
|
function procCall() {
|
|
$component = Context::get('component');
|
|
$method = Context::get('method');
|
|
if(!$component) return new Object(-1, sprintf(Context::getLang('msg_component_is_not_founded'), $component));
|
|
|
|
$oComponent = &$this->getComponentObject($component);
|
|
if(!$oComponent->toBool()) return $oComponent;
|
|
|
|
if(!method_exists($oComponent, $method)) return new Object(-1, sprintf(Context::getLang('msg_component_is_not_founded'), $component));
|
|
|
|
$output = call_user_method($method, $oComponent);
|
|
if((is_a($output, 'Object') || is_subclass_of($output, 'Object')) && !$output->toBool()) return $output;
|
|
|
|
$this->setError($oComponent->getError());
|
|
$this->setMessage($oComponent->getMessage());
|
|
|
|
$vars = $oComponent->getVariables();
|
|
if(count($vars)) {
|
|
foreach($vars as $key=>$val) $this->add($key, $val);
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
?>
|