Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- class SiteUtil{
- private static $headerText;
- public static function setHeaderText($text){
- self::$headerText=$text;
- }
- public static function getHeaderText(){
- return self::$headerText;
- }
- }
- ?>
- теперь в месте, где нужно выводить пишем
- <?$APPLICATION->AddBufferContent(Array(SiteUtil, "getHeaderText")); ?>
- и вызываем где нужно:
- <?
- SiteUtil::setHeaderText('Этот текст будет перезаписан');
- SiteUtil::setHeaderText('Выведен будет этот текст');
- ?>
Advertisement
Add Comment
Please, Sign In to add comment