<?php
interface Testable
{
public function test();
}
abstract class windows implements Testable
{
abstract function name();
}
class window extends windows
{
public function name()
{
echo 'window';
}
public function test()
{
echo $this->name() . 'test';
}
}
class home
{
public static function add(Testable $item)
{
$item->test();
}
}
$window = new window();
home::add($window);