silverstripe-framework/tests/php/Core/ObjectTest/ExtendTest2.php

24 lines
510 B
PHP
Raw Normal View History

2016-10-14 03:30:05 +02:00
<?php
namespace SilverStripe\Core\Tests\ObjectTest;
use SilverStripe\Core\Extension;
use SilverStripe\Dev\TestOnly;
2016-10-14 03:30:05 +02:00
class ExtendTest2 extends Extension implements TestOnly
2016-10-14 03:30:05 +02:00
{
protected $constructorArgs = [];
public function __construct()
{
2017-06-23 05:13:55 +02:00
parent::__construct();
$this->constructorArgs = func_get_args();
}
public function extendableMethod($argument = null)
{
$args = implode(',', array_filter(func_get_args()));
return "ExtendTest2($args)";
}
2016-10-14 03:30:05 +02:00
}