Skip to content

Commit 57919b8

Browse files
committed
closes issue #16 to use Doctrine's debug instead of var_dump();
1 parent 470dd0d commit 57919b8

File tree

4 files changed

+22
-4
lines changed

4 files changed

+22
-4
lines changed

Module.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use ZF2EntityAudit\EventListener\LogRevisionsListener;
1010
use ZF2EntityAudit\View\Helper\DateTimeFormatter;
1111
use ZF2EntityAudit\View\Helper\User as UserBlock;
12-
12+
use ZF2EntityAudit\View\Helper\Dump ;
1313
use Zend\ModuleManager\Feature\ConsoleUsageProviderInterface;
1414
use Zend\Console\Adapter\AdapterInterface as Console;
1515

@@ -100,6 +100,10 @@ public function getViewHelperConfig()
100100
$helper->setEntityManager($em);
101101
$helper->setZfcUserEntityClass($config['zf2-entity-audit']['zfcuser.entity_class']);
102102
return $helper ;
103+
},
104+
'Dump' => function($sm){
105+
$helper = new Dump();
106+
return $helper;
103107
}
104108
)
105109
);

src/ZF2EntityAudit/Version.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44

55
class Version
66
{
7-
const VERSION = '0.2-ALPHA';
7+
const VERSION = '0.2-STABLE';
88
}
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
namespace ZF2EntityAudit\View\Helper ;
3+
4+
use Zend\View\Helper\AbstractHelper;
5+
use Doctrine\Common\Util\Debug ;
6+
7+
class Dump extends AbstractHelper
8+
{
9+
10+
public function __invoke($object)
11+
{
12+
return Debug::dump($object);
13+
}
14+
}

view/zf2-entity-audit/index/viewrevision.phtml

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@
5050
<?php echo $this->escapeHtml($ce->getClassName()); ?>
5151
</span>
5252
</td>
53-
<td><?php var_dump($ce->getEntity()); ?></td>
53+
<td><?php $this->Dump($ce->getEntity()); ?></td>
5454
</tr>
5555
<? endforeach; ?>
5656
</tbody>
5757

5858
</table>
5959
</div>
60-
</div>
60+
</div>

0 commit comments

Comments
 (0)