* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
- * @package MediaWiki
- * @subpackage SpecialPage
+ * @ingroup SpecialPage
*/
class MacBinary {
- function MacBinary( $filename ) {
+ function __construct( $filename ) {
$this->open( $filename );
$this->loadHeader();
}
* The file must be seekable, such as local filesystem.
* Remote URLs probably won't work.
*
- * @param string $filename
+ * @param $filename String
*/
function open( $filename ) {
$this->valid = false;
/**
* Does this appear to be a valid MacBinary archive?
- * @return bool
+ *
+ * @return Boolean
*/
function isValid() {
return $this->valid;
/**
* Get length of data fork
- * @return int
+ *
+ * @return Integer
*/
function dataForkLength() {
return $this->dataLength;
/**
* Copy the data fork to an external file or resource.
- * @param resource $destination
- * @return bool
+ *
+ * @param $destination Ressource
+ * @return Boolean
*/
function extractData( $destination ) {
if( !$this->isValid() ) {
fseek( $this->handle, 0 );
$head = fread( $this->handle, 128 );
- $this->hexdump( $head );
+ #$this->hexdump( $head );
if( strlen( $head ) < 128 ) {
wfDebug( "$fname: couldn't read full MacBinary header\n" );
* with magic array thingy by Jim Van Verth.
* http://search.cpan.org/~eryq/Convert-BinHex-1.119/lib/Convert/BinHex.pm
*
- * @param string $data
- * @param int $seed
- * @return int
+ * @param $data String
+ * @param $seed Integer
+ * @return Integer
* @access private
*/
function calcCRC( $data, $seed = 0 ) {
}
/**
- * @param resource $destination
- * @param int $bytesToCopy
- * @return bool
+ * @param $destination Resource
+ * @param $bytesToCopy Integer
+ * @return Boolean
* @access private
*/
function copyBytesTo( $destination, $bytesToCopy ) {
}
}
}
-
-?>
\ No newline at end of file