Zend_Reflection Examples Performing reflection on a file The %s file\n". " has %d lines\n", $r->getFileName(), $r->getEndLine() ); $classes = $r->getClasses(); echo " It has " . count($classes) . ":\n"; foreach ($classes as $class) { echo " " . $class->getName() . "\n"; } $functions = $r->getFunctions(); echo " It has " . count($functions) . ":\n"; foreach ($functions as $function) { echo " " . $function->getName() . "\n"; } ]]> Performing reflection on a class getDocblock()->getShortDescription(), $r->getDocblock()->getLongDescription(), ); // Get the declaring file reflection $file = $r->getDeclaringFile(); ]]> Performing reflection on a method getName()); foreach ($r->getParameters() as $key => $param) { printf( "Param at position '%d' is of type '%s'\n", $key, $param->getType() ); } ]]> Performing reflection on a docblock getDocblock(); printf( "The short description: %s\n". "The long description:\n%s\n", $r->getDocblock()->getShortDescription(), $r->getDocblock()->getLongDescription(), ); foreach ($docblock->getTags() as $tag) { printf( "Annotation tag '%s' has the description '%s'\n", $tag->getName(), $tag->getDescription() ); } ]]>