All pastes #616720 Raw Edit

Untitled

public text v1 · immutable
·published 2007-07-12 20:11 UTC
rendered paste body
class Skin extends Linker {
        function getCategoryLinks () {
                [...]
                return $s;
        }

        function getCategories() {
                $catlinks=$this->getCategoryLinks();
                if(!empty($catlinks)) {
                        return "<p class='catlinks'>{$catlinks}</p>";
                }
        }
}

class MySkin extends Skin {
        function getCategoryLinks() {
               //new way of processing
               return result;
        }

        function getCategories() {
               $catlinks = $this->getCategoryLinks();
               if (!empty($catlinks)) {
                       return new html;
               }
        }
}

create object of new class and use it
$x = new MySkin();
$x->getCategories();