Something went wrong. Try again.
@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
Something went wrong. Try again.
1.0 kB · 45 lines
PHP
12345678910111213141516171819202122232425262728293031323334353637383940414243444546<?php
abstract class CelerityPostprocessor extends Phobject {
private $default;
abstract public function getPostprocessorKey(); abstract public function getPostprocessorName(); abstract public function buildVariables();
public function buildDefaultPostprocessor() { return new CelerityDefaultPostprocessor(); }
final public function getVariables() { $variables = $this->buildVariables();
$default = $this->getDefault(); if ($default) { $variables += $default->getVariables(); }
return $variables; }
final public function getDefault() { if ($this->default === null) { $this->default = $this->buildDefaultPostprocessor(); } return $this->default; }
final public static function getPostprocessor($key) { return idx(self::getAllPostprocessors(), $key); }
final public static function getAllPostprocessors() { return id(new PhutilClassMapQuery()) ->setAncestorClass(self::class) ->setUniqueMethod('getPostprocessorKey') ->execute(); }
}