示例#1
0
 public static function Render($content)
 {
     if (is_array($content)) {
         $res = '';
         foreach ($content as $item) {
             $res .= Render($item);
         }
         return $res;
     } elseif (is_a($content, 'Tapir\\TemplateBundle\\Tgen\\Tag', false)) {
         return $content->Render();
     } elseif (is_a($content, 'Tapir\\TemplateBundle\\Tgen\\Content', false)) {
         return $content->Render();
     } else {
         return (string) $content;
     }
 }
示例#2
0
function RenderPage($strPage)
{
    $strWikiContent = GetWikiContent($strPage);
    $strModifiedWikiContent = $strWikiContent . GetSpecialContent($strPage);
    return Render($strModifiedWikiContent);
}
示例#3
0
 public function render($displayBase = true)
 {
     // Could add to pageData here...
     echo Render($this->pageTemplate, $this->pageData, $displayBase);
 }
示例#4
0
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA//
// ***** END LICENSE BLOCK *****
////////////////////////////////////////////////////////////////////////////////
require dirname(__FILE__) . '/sdk/sdk.php';
/////////////////////////////////////////////////////////////
// Chargement des informations de la page
$strPage = GetCurrentPage();
// Chargement du contenu wiki pour cette page
$strWikiContent = GetWikiContent($strPage);
// On ajoute du contenu supplémentaire pour certaines pages comme la liste ou les changements
$strModifiedWikiContent = $strWikiContent . GetSpecialContent($strPage);
// Rendu wiki
$strHtmlContent = Render($strModifiedWikiContent);
/////////////////////////////////////////////////////////////
// Chargement du template
$strContent = LoadTemplate('wiki');
// Les premiers remplacements sont en fonction du fichier de config
$astrReplacements = BuildStandardReplacements();
// Ajoute les remplacements « runtime »
AddReplacement($astrReplacements, 'Page.Name', htmlspecialchars($strPage));
AddReplacement($astrReplacements, 'Page.Wiki', $strWikiContent);
AddReplacement($astrReplacements, 'Page.Html', $strHtmlContent);
// Applique les remplacements
$strContent = ReplaceAll($strContent, $astrReplacements);
/////////////////////////////////////////////////////////////
WriteXhtmlHeader();
echo $strContent;
示例#5
0
                        Render($render_params);
                    } else {
                        if ($_POST && isset($_POST['create_auth_ticket'])) {
                            CreateAuthTicket($_POST['ipaddress'], $_POST['minutes_to_live'], $_POST['resource_id'], $_POST['user_name'], $render_params);
                            Render($render_params);
                        } else {
                            Render($render_params);
                        }
                    }
                }
            }
        }
    }
} catch (Exception $ex) {
    $render_params['error_message'] = SetError($ex->getMessage());
    Render($render_params);
}
/**
 * Test the Edas connection
 *
 * This call illustrates using a previously-instantiated {@link ExternalAccessClient} which has cached
 * its own ticket. Once Login() is called on a given client, that client instance will maintain its own user ticket
 * and will use that if one is not supplied in the method call.
 * Once a given request has ended, that client is no longer available
 *
 * @param ExternalAccessClient $client
 * @param array $render_params values to pass to the Render() method
 */
function TestConnection(ExternalAccessClient $client, &$render_params)
{
    $render_params['test_results'] = PrePrint($client->Test());