}
}
-class MinificheView extends MultipageView
+abstract class ProfileView extends MultipageView
+{
+ protected function getBoundValue($obj)
+ {
+ if ($obj instanceof Profile) {
+ switch ($this->bound_field) {
+ case 'name':
+ $name = $obj->name('%l');
+ return strtoupper($name);
+ case 'promo':
+ return $obj->promo();
+ default:
+ return null;
+ }
+ }
+ return null;
+ }
+}
+
+class MinificheView extends ProfileView
{
public function __construct(PlSet &$set, $data, array $params)
{
parent::__construct($set, $data, $params);
}
- protected function getBoundValue($obj)
- {
- if ($obj instanceof Profile) {
- switch ($this->bound_field) {
- case 'name':
- $name = $obj->name('%l');
- return strtoupper($name);
- case 'promo':
- return $obj->promo();
- default:
- return null;
- }
- }
- return null;
- }
-
public function bounds()
{
$order = Env::v('order', $this->defaultkey);
}
}
-class MentorView extends MultipageView
+class MentorView extends ProfileView
{
public function __construct(PlSet &$set, $data, array $params)
{
parent::__construct($set, $data, $params);
}
- protected function getBoundValue($obj)
- {
- if ($obj instanceof Profile) {
- switch ($this->bound_field) {
- case 'name':
- $name = $obj->name('%l');
- return strtoupper($name);
- case 'promo':
- return $obj->promo();
- default:
- return null;
- }
- }
- return null;
- }
-
public function bounds()
{
$order = Env::v('order', $this->defaultkey);
}
}
-class TrombiView extends MultipageView
+class TrombiView extends ProfileView
{
public function __construct(PlSet &$set, $data, array $params)
{
parent::__construct($set, $data, $params);
}
- protected function getBoundValue($obj)
- {
- if ($obj instanceof Profile) {
- switch ($this->bound_field) {
- case 'name':
- $name = $obj->name('%l');
- return strtoupper($name);
- case 'promo':
- return $obj->promo();
- default:
- return null;
- }
- }
- return null;
- }
-
public function bounds()
{
$order = Env::v('order', $this->defaultkey);