| Server IP : 118.27.122.120 / Your IP : 216.73.216.136 Web Server : Apache System : Linux web0216.sh.tyo1 4.18.0-553.141.2.lve.el7h.x86_64 #1 SMP Wed Jul 8 17:20:31 UTC 2026 x86_64 User : r4834334 ( 11094) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/self/root/opt/cloudlinux/alt-php73/root/usr/share/pear/test/File_MARC/tests/ |
Upload File : |
--TEST--
marc_023: test extended Record interface
--SKIPIF--
<?php include('tests/skipif.inc'); ?>
--FILE--
<?php
$dir = dirname(__FILE__);
require __DIR__ . '/bootstrap.php';
class MyRecord extends File_MARC_Record {
public function myNewMethod() {
return $this->getField('040')->getSubfield('a')->getData();
}
}
$marc_file = new File_MARC($dir . '/' . 'example.mrc', File_MARC::SOURCE_FILE, MyRecord::class);
$rec = $marc_file->next();
print get_class($rec) . "\n";
print $rec->myNewMethod() . "\n";
?>
--EXPECT--
MyRecord
NB