Пример #1
0
/**
* Returns all loaded Javascript
* @see JPSpan_Include
* @package JPSpan
* @subpackage Include
* @return string
* @access public
*/
function JPSpan_Includes_Fetch()
{
    $Includer =& JPSpan_Include::instance();
    return $Includer->getCode();
}
Пример #2
0
 function getClient()
 {
     require_once JPSPAN . 'CodeWriter.php';
     $Code =& new JPSpan_CodeWriter();
     $this->generate($Code);
     $client = $Code->toString();
     require_once JPSPAN . 'Include.php';
     $I =& JPSpan_Include::instance();
     // HACK - this needs to change
     $I->loadString(__FILE__, $client);
     return $I->getCode();
 }
Пример #3
0
 /**
  * Display the Javascript client and exit
  * @return void
  * @access public
  */
 function displayClient()
 {
     $G =& $this->getGenerator();
     require_once JPSPAN . 'Include.php';
     $I =& JPSpan_Include::instance();
     // HACK - this needs to change
     $I->loadString(__FILE__, $G->getClient());
     $client = $I->getCode();
     header('Content-Type: application/x-javascript');
     header('Content-Length: ' . strlen($client));
     echo $client;
     exit;
 }