Skip to content
Snippets Groups Projects
Select Git revision
  • 81570eca3f4ab5d6fb8de8742a0abeb89e4feb27
  • master default protected
2 results

searches.js

Blame
  • TestController.php 1.07 KiB
    <?php
    
    class TestController extends Nmc_Controller_Action
    {
    
        public function init()
        {
            //$this->_registerPlugin(new Nmc_Controller_Action_Plugin_Authorize());
            //$this->_registerPlugin(new Nmc_Controller_Action_Plugin_Test());
        }
    
        public function indexAction()
        {
    
        }
    
        public function domAction()
        {
            $dom = new DOMDocument();
            $dom->appendChild(
                $dom->createProcessingInstruction('xml-stylesheet',
                                                  'type="text/xsl" href="/xsl/test.xsl"')
            );
            $view = $dom->createElement('view');
            $dom->appendChild($view);
    
            $title = $dom->createElement('title');
            $title->appendChild($dom->createTextNode('Test Page'));
            $view->appendChild($title);
    
            $cssFile = $dom->createElement('cssFile');
            $cssFile->appendChild($dom->createTextNode('/css/index.css'));
            $view->appendChild($cssFile);
    
            $out = $this->getResponse();
            $out->setHeader('Content-type', 'text/xml');
            $out->setBody($dom->saveXML());
        }
    }
    
    ?>