Skip to content

Commit

Permalink
Add __set method
Browse files Browse the repository at this point in the history
  • Loading branch information
DariusIII committed Mar 4, 2019
1 parent 0c39ba6 commit 237cb87
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions ArchiveReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
abstract class ArchiveReader
{
// ------ Class variables and methods -----------------------------------------
public $externalClient;

/**
/**
* Unpacks data from a binary string.
*
* This method helps in particular to fix unpacking of unsigned longs on 32-bit
Expand Down Expand Up @@ -370,7 +371,7 @@ public function setMaxReadBytes($bytes)
*/
public function __toString()
{
return print_r($this->getSummary(true), true);
return (string) print_r($this->getSummary(true), true);
}

/**
Expand Down Expand Up @@ -405,7 +406,16 @@ public function __isset($name)
return isset($this->$name);
}

/**
/**
* @param $name
* @param $value
*/
public function __set($name, $value)
{
$this->name = $value;
}

/**
* Class destructor.
*
* @return void
Expand Down

0 comments on commit 237cb87

Please sign in to comment.