Ejemplo n.º 1
0
 protected function getComposerCommand()
 {
     if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
         return PHP_BINARY . ' ' . $this->executable->getRealPath();
     }
     return '/usr/bin/env php ' . $this->executable->getRealPath();
 }
Ejemplo n.º 2
0
 public function realPath()
 {
     return parent::getRealPath();
 }
 protected function getComposerCommand()
 {
     $command = '/usr/bin/env php ' . $this->executable->getRealPath();
     return $command;
 }
Ejemplo n.º 4
0
require '../vendor/autoload.php';
# instantiate the backup
$backup = new Backup([]);
$backup->addFolder('../vendor')->compressWith('zip')->saveAt(['local']);
var_dump("Backup: {$backup}");
$file = new SPLFileInfo(realpath('../src/Backup.php'));
$inspected = $backup->inspect();
echo '<ul>';
foreach ($inspected as $class => $data) {
    echo '<li><h2><code>' . $class . '</h2></code>';
    echo '<ul>';
    foreach ($data as $key => $values) {
        echo '<li><h3><code>' . $key . '</h3></code>';
        echo '<ul id="' . $key . '">';
        foreach ($values as $value) {
            if ($value instanceof \ReflectionProperty) {
                $value->setAccessible(true);
                echo '<li><h4><code>' . $value->getName() . '</code>' . ($value->isPublic() ? ' [public]' : '') . '</h4><pre>' . json_encode($value->getValue($backup), JSON_PRETTY_PRINT) . '</pre>';
            } else {
                echo '<li><h4><code>' . $value->getName() . '</code>' . ($value->isPublic() ? ' [public]' : '') . '</h4><pre>' . $value . '</pre></li>';
            }
        }
        echo '</ul>';
    }
    echo '</ul>';
    echo '</li>';
}
echo '</ul>';
echo '<h2>Hash von backup.php: <code>';
echo murmurhash3($file->getRealPath() . $file->getSize() . $file->getCTime());
echo '</code></h2>';