Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
366 additions
and
288 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the awesomite/var-dumper package. | ||
* | ||
* (c) Bartłomiej Krukowski <bartlomiej@krukowski.me> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Awesomite\VarDumper\Helpers; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
class BoolValue | ||
{ | ||
private $value; | ||
|
||
public function __construct($value = false) | ||
{ | ||
$this->value = $value; | ||
} | ||
|
||
public function getValue() | ||
{ | ||
return $this->value; | ||
} | ||
|
||
public function setValue($value) | ||
{ | ||
$this->value = $value; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the awesomite/var-dumper package. | ||
* | ||
* (c) Bartłomiej Krukowski <bartlomiej@krukowski.me> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Awesomite\VarDumper\Helpers; | ||
|
||
use Awesomite\VarDumper\Config\Config; | ||
use Awesomite\VarDumper\LightVarDumper; | ||
use Awesomite\VarDumper\Objects\HasherFactory; | ||
use Awesomite\VarDumper\Objects\HasherInterface; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
class Container | ||
{ | ||
private $references; | ||
|
||
private $depth; | ||
|
||
private $config; | ||
|
||
private $printNlOnEnd; | ||
|
||
private $dumper; | ||
|
||
private static $hasher; | ||
|
||
public function __construct(Config $config, LightVarDumper $dumper) | ||
{ | ||
$this->config = $config; | ||
$this->dumper = $dumper; | ||
} | ||
|
||
/** | ||
* @return Config | ||
*/ | ||
public function getConfig() | ||
{ | ||
return $this->config; | ||
} | ||
|
||
/** | ||
* @return Stack | ||
*/ | ||
public function getReferences() | ||
{ | ||
return $this->references ?: $this->references = new Stack(); | ||
} | ||
|
||
/** | ||
* @return IntValue | ||
*/ | ||
public function getDepth() | ||
{ | ||
return $this->depth ?: $this->depth = new IntValue(); | ||
} | ||
|
||
/** | ||
* @return BoolValue | ||
*/ | ||
public function getPrintNlOnEnd() | ||
{ | ||
return $this->printNlOnEnd ?: $this->printNlOnEnd = new BoolValue(true); | ||
} | ||
|
||
/** | ||
* @return LightVarDumper | ||
*/ | ||
public function getDumper() | ||
{ | ||
return $this->dumper; | ||
} | ||
|
||
/** | ||
* @return HasherInterface | ||
*/ | ||
public function getHasher() | ||
{ | ||
return self::$hasher ?: self::$hasher = HasherFactory::create(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the awesomite/var-dumper package. | ||
* | ||
* (c) Bartłomiej Krukowski <bartlomiej@krukowski.me> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Awesomite\VarDumper\Subdumpers; | ||
|
||
use Awesomite\VarDumper\Helpers\Container; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
abstract class AbstractDumper implements SubdumperInterface | ||
{ | ||
protected $container; | ||
|
||
public function __construct(Container $container) | ||
{ | ||
$this->container = $container; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.