예제 #1
0
파일: SCA.php 프로젝트: psagi/sdo
            }
        }
        return $xmldas->createDataObject($namespace_uri, $type_name);
    }
    /**
     * This function can be called directly by a php script to dispatch a request to
     * an SCA service. You only need to use this operation when you organize your
     * code so that the service implementation (and SCA/SCA.php include) are included
     * by in a script that is just a wrapper script and is not acting as a client for
     * the service. This can happen if you want keep php files that define service
     * outside of the htdocs directory
     *
     * @param string $class_name The class_name that implements the target service
     *
     * @return void
     */
    public static function dispatch($class_name)
    {
        $file_name = SCA_Helper::getFileContainingClass($class_name);
        $_SERVER['SCRIPT_FILENAME'] = $file_name;
        SCA::initComponent($file_name);
    }
}
/**
* Check that the correct extensions have been loaded before starting, and
* initialise the sca class to the script file including SCA.
*/
SCA_Helper::checkSdoExtensionLoaded();
$backtrace = debug_backtrace();
$immediate_caller = $backtrace[0]['file'];
SCA::initComponent($immediate_caller);