PK
œqhYî¶J‚ßF ßF ) nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/
Notice: ob_end_clean(): Failed to delete buffer. No buffer to delete in /home/foruwedy/public_html/57dae0/index.php on line 8
| Dir : /home/foruwedy/www/vendor/mockery/mockery/library/Mockery/Loader/ |
| Server: Linux premium227.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64 IP: 66.29.146.38 |
| Dir : /home/foruwedy/www/vendor/mockery/mockery/library/Mockery/Loader/RequireLoader.php |
<?php
/**
* Mockery (https://docs.mockery.io/)
*
* @copyright https://github.com/mockery/mockery/blob/HEAD/COPYRIGHT.md
* @license https://github.com/mockery/mockery/blob/HEAD/LICENSE BSD 3-Clause License
* @link https://github.com/mockery/mockery for the canonical source repository
*/
namespace Mockery\Loader;
use Mockery\Generator\MockDefinition;
use Mockery\Loader\Loader;
class RequireLoader implements Loader
{
/**
* @var string
*/
protected $path;
/**
* @var string
*/
protected $lastPath = '';
public function __construct($path = null)
{
$this->path = realpath($path) ?: sys_get_temp_dir();
register_shutdown_function([$this, '__destruct']);
}
public function __destruct()
{
$files = array_diff(
glob($this->path . DIRECTORY_SEPARATOR . 'Mockery_*.php')?:[],
[$this->lastPath]
);
foreach ($files as $file) {
@unlink($file);
}
}
public function load(MockDefinition $definition)
{
if (class_exists($definition->getClassName(), false)) {
return;
}
$this->lastPath = sprintf('%s%s%s.php', $this->path, DIRECTORY_SEPARATOR, uniqid('Mockery_'));
file_put_contents($this->lastPath, $definition->getCode());
if (file_exists($this->lastPath)){
require $this->lastPath;
}
}
}