예제 #1
0
    /**
     * Retorna um node XML do objeto, as tags HTML dos conteudos dos obetos são
     * codigicados por htmlentities()
     *
     * @param string $whereCondition condição de carregamento
     * @param string $order ordem dos registros
     * @param string $limit limite de registros
     * @param boolean $lightMode se serão carregados os objetos dentro dos objetos
     * @param boolean $addXmlRootTags
     * @return string node xml dos registros
     */
    public function loadXml($whereCondition = "", $order = "", $limit = "", $lightMode = false, $addXmlRootTags = false)
    {
        $crud = $this->myCRUD();
        $crud->loadLightArray($whereCondition, $order, $limit, false, !$lightMode, true);
        $str = CRUD::$xmlStr;
        if ($addXmlRootTags) {
            $str = '<?xml version="1.0" encoding="ISO-8859-1"?>
<root>' . $str . "</root>";
        }
        CRUD::$xmlStr = "";
        return $str;
    }
예제 #2
0
    /**
     * Retorna um node XML do objeto, as tags HTML dos conteudos dos obetos são
     * codigicados por htmlentities()
     *
     * @param string $whereCondition condição de carregamento
     * @param string $order ordem dos registros
     * @param string $limit limite de registros
     * @param boolean $lightMode se serão carregados os objetos dentro dos objetos
     * @param boolean $addXmlRootTags
     * @return string node xml dos registros
     */
    public static function tSamus_Controllerml($classOrObject, $whereCondition = "", $order = "", $limit = "", $lightMode = false, $addXmlRootTags = false)
    {
        $crud = new CRUD($classOrObject);
        $obj = self::getInstance($classNameOrObject);
        $crud->loadLightArray($whereCondition, $order, $limit, false, !$lightMode, true);
        $str = CRUD::$xmlStr;
        if ($addXmlRootTags) {
            $str = '<?xml version="1.0" encoding="ISO-8859-1"?>
<root>' . $str . "</root>";
        }
        CRUD::$xmlStr = "";
        return $str;
    }