Показать сообщение отдельно
Старый 02.07.2012, 00:26   #10
Ивано
Guest
 
Сообщений: n/a
Red face

Вот допусти стандартный класс, созданный через kickstarter:

PHP код:
require_once(PATH_tslib.'class.tslib_pibase.php');


/**
 * Plugin 'fwe' for the 'few' extension.
 *
 * @author    Иван <litovan@bk.ru>
 * @package    TYPO3
 * @subpackage    tx_few
 */
class tx_few_pi1 extends tslib_pibase {
    var 
$prefixId      'tx_few_pi1';        // Same as class name
    
var $scriptRelPath 'pi1/class.tx_few_pi1.php';    // Path to this script relative to the extension dir.
    
var $extKey        'few';    // The extension key.
    
var $pi_checkCHash true;
    
    
/**
     * The main method of the PlugIn
     *
     * @param    string        $content: The PlugIn content
     * @param    array        $conf: The PlugIn configuration
     * @return    The content that is displayed on the website
     */
    
function main($content$conf) {
        
$this->conf $conf;
        
$this->pi_setPiVarDefaults();
        
$this->pi_loadLL();
        
    
        
$content='
            <strong>This is a few paragraphs:</strong><br />
            <p>This is line 1</p>
            <p>This is line 2</p>
    
            <h3>This is a form:</h3>
            <form action="'
.$this->pi_getPageLink($GLOBALS['TSFE']->id).'" method="POST">
                <input type="text" name="'
.$this->prefixId.'[input_field]" value="'.htmlspecialchars($this->piVars['input_field']).'">
                <input type="submit" name="'
.$this->prefixId.'[submit_button]" value="'.htmlspecialchars($this->pi_getLL('submit_button_label')).'">
            </form>
            <br />
            <p>You can click here to '
.$this->pi_linkToPage('get to this page again',$GLOBALS['TSFE']->id).'</p>
        '
;
    
        return 
$this->pi_wrapInBaseClass($content);
    }
}



if (
defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/few/pi1/class.tx_few_pi1.php'])    {
    include_once(
$TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/few/pi1/class.tx_few_pi1.php']);

Как в нем использовать функции кэширования встроенные в ядро на основе таблиц из примера первой ссылки?
  Ответить с цитированием