Skip to content

Commit

Permalink
Fixing tools code view for attached and wrapped methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
KrisJordan committed Sep 7, 2009
1 parent 4d3565c commit df37eaf
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions recess/recess/apps/tools/views/code/classInfo.html.php
Expand Up @@ -82,7 +82,7 @@ function printModelInfo($table, $source, $relationships, $columns) {
}

if(!empty($attachedMethods)) {
printAttachedMethods($attachedMethods);
printAttachedMethods($attachedMethods, $reflection);
}

if(!empty($instanceMethods)) {
Expand Down Expand Up @@ -209,13 +209,20 @@ function printMethod($method, $reflectionMethod=NULL) {
?>

<?php
function printAttachedMethods($methods) { ?>
function printAttachedMethods($methods, $reflectedClass="") { ?>
<h4>Attached Methods</h4>
<ul class="attached-methods">
<?php
sort($methods);
foreach($methods as $method) {
$reflectionMethod = $method->object->reflectedMethod;
$object = $method->object;
if($object instanceof WrappedMethod) {
$reflectionMethod = $reflectedClass->getMethod($object->method);
} else {
$reflectionMethod = new ReflectionMethod($method->object, $method->method);
// print_r($method);exit;
// $reflectionMethod = $method->object->reflectedMethod;
}
printMethod($method, $reflectionMethod);
}
?>
Expand Down

0 comments on commit df37eaf

Please sign in to comment.