silverstripe-framework/tests/php/Dev/CsvBulkLoaderTest/CustomLoader.php

20 lines
418 B
PHP
Raw Normal View History

2016-10-14 03:30:05 +02:00
<?php
namespace SilverStripe\Dev\Tests\CsvBulkLoaderTest;
use SilverStripe\Dev\CsvBulkLoader;
use SilverStripe\Dev\TestOnly;
class CustomLoader extends CsvBulkLoader implements TestOnly
{
public function importFirstName(&$obj, $val, $record)
{
$obj->FirstName = "Customized {$val}";
}
2016-10-14 03:30:05 +02:00
public function updatePlayer(&$obj, $val, $record)
{
$obj->FirstName .= $val . '. ';
}
2016-10-14 03:30:05 +02:00
}