web/lib/Zend/View/Helper/InlineScript.php
changeset 64 162c1de6545a
parent 19 1c2f13fd785c
child 68 ecaf28ffe26e
equal deleted inserted replaced
63:5b37998e522e 64:162c1de6545a
       
     1 <?php
       
     2 /**
       
     3  * Zend Framework
       
     4  *
       
     5  * LICENSE
       
     6  *
       
     7  * This source file is subject to the new BSD license that is bundled
       
     8  * with this package in the file LICENSE.txt.
       
     9  * It is also available through the world-wide-web at this URL:
       
    10  * http://framework.zend.com/license/new-bsd
       
    11  * If you did not receive a copy of the license and are unable to
       
    12  * obtain it through the world-wide-web, please send an email
       
    13  * to license@zend.com so we can send you a copy immediately.
       
    14  *
       
    15  * @category   Zend
       
    16  * @package    Zend_View
       
    17  * @subpackage Helper
       
    18  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
       
    19  * @version    $Id: InlineScript.php 20096 2010-01-06 02:05:09Z bkarwin $
       
    20  * @license    http://framework.zend.com/license/new-bsd     New BSD License
       
    21  */
       
    22 
       
    23 /** Zend_View_Helper_HeadScript */
       
    24 require_once 'Zend/View/Helper/HeadScript.php';
       
    25 
       
    26 /**
       
    27  * Helper for setting and retrieving script elements for inclusion in HTML body
       
    28  * section
       
    29  *
       
    30  * @uses       Zend_View_Helper_Head_Script
       
    31  * @package    Zend_View
       
    32  * @subpackage Helper
       
    33  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
       
    34  * @license    http://framework.zend.com/license/new-bsd     New BSD License
       
    35  */
       
    36 class Zend_View_Helper_InlineScript extends Zend_View_Helper_HeadScript
       
    37 {
       
    38     /**
       
    39      * Registry key for placeholder
       
    40      * @var string
       
    41      */
       
    42     protected $_regKey = 'Zend_View_Helper_InlineScript';
       
    43 
       
    44     /**
       
    45      * Return InlineScript object
       
    46      *
       
    47      * Returns InlineScript helper object; optionally, allows specifying a
       
    48      * script or script file to include.
       
    49      *
       
    50      * @param  string $mode Script or file
       
    51      * @param  string $spec Script/url
       
    52      * @param  string $placement Append, prepend, or set
       
    53      * @param  array $attrs Array of script attributes
       
    54      * @param  string $type Script type and/or array of script attributes
       
    55      * @return Zend_View_Helper_InlineScript
       
    56      */
       
    57     public function inlineScript($mode = Zend_View_Helper_HeadScript::FILE, $spec = null, $placement = 'APPEND', array $attrs = array(), $type = 'text/javascript')
       
    58     {
       
    59         return $this->headScript($mode, $spec, $placement, $attrs, $type);
       
    60     }
       
    61 }