app/code/community/Aoe/TemplateHints/Helper/BlockInfo.php
public function getClassMethods($className) {

        if (!isset($this->classMethodCache[$className])) {

            $info = array();

            $rClass = new ReflectionClass($className);

            $currentClass = $rClass;
            $currentClassName = $currentClass->getName();
            $currentMethods = get_class_methods($currentClass->getName());
            $parentClass = $currentClass->getParentClass();

            $level = 1;
            while ($parentClass && $level < 6) {

                $parentClassName = $parentClass->getName();

                if (!in_array($currentClassName, array('Mage_Core_Block_Abstract', 'Mage_Core_Block_Template'))) {
                    $parentMethods = get_class_methods($parentClassName);
                    $tmp = array_diff($currentMethods, $parentMethods);
                    $info[$currentClassName] = array();

                    // render methods to "methodName($paramter1, $parameter2, ...)"
                    foreach ($tmp as $methodName) {

                        $parameters = array();
                        foreach ($currentClass->getMethod($methodName)->getParameters() as $parameter) { /* @var $parameter ReflectionParameter */
                            $parameters[] = '$'. $parameter->getName();
                        }

                        if (count($parameters) > 3) {
                            $parameters = array_slice($parameters, 0, 2);
                            $parameters[] = '...';
                        }

                        $info[$currentClassName][] = $methodName . '(' . implode(', ', $parameters) . ')';
                    }
                } else {
                    $info[$currentClassName] = array('(skipping)');
                    $parentMethods = array();
                }

                $level++;

                $currentClass = $parentClass;
                $currentClassName = $currentClass->getName();
                $currentMethods = $parentMethods;
                $parentClass = $currentClass->getParentClass();
            }

            $this->classMethodCache[$className] = $info;
        }

        return $this->classMethodCache[$className];
    }
public function getClassMethods($className) {

        if (!isset($this->classMethodCache[$className])) {

            $info = array();

            $rClass = new ReflectionClass($className);

            $currentClass = $rClass;
            $currentClassName = $currentClass->getName();
            $currentMethods = get_class_methods($currentClass->getName());
            $parentClass = $currentClass->getParentClass();

            $level = 1;
            while ($parentClass && $level < 6) {

                $parentClassName = $parentClass->getName();

                if (!in_array($currentClassName, array('Mage_Core_Block_Abstract', 'Mage_Core_Block_Template'))) {
                    $parentMethods = get_class_methods($parentClassName);
                    $tmp = array_diff($currentMethods, $parentMethods);
                    $info[$currentClassName] = array();

                    // render methods to "methodName($paramter1, $parameter2, ...)"
                    foreach ($tmp as $methodName) {

                        $parameters = array();
                        foreach ($currentClass->getMethod($methodName)->getParameters() as $parameter) { /* @var $parameter ReflectionParameter */
                            $parameters[] = '$'. $parameter->getName();
                        }

                        if (count($parameters) > 3) {
                            $parameters = array_slice($parameters, 0, 2);
                            $parameters[] = '...';
                        }

                        $info[$currentClassName][] = $methodName . '(' . implode(', ', $parameters) . ')';
                    }
                } else {
                    $info[$currentClassName] = array('(skipping)');
                    $parentMethods = array();
                }

                $level++;

                $currentClass = $parentClass;
                $currentClassName = $currentClass->getName();
                $currentMethods = $parentMethods;
                $parentClass = $currentClass->getParentClass();
            }

            $this->classMethodCache[$className] = $info;
        }

        return $this->classMethodCache[$className];
    }
public function getClassMethods ( $ className ) { if ( ! isset ( $ this -> classMethodCache [ $ className ] ) ) { $ info = array ( ) ; $ rClass = new ReflectionClass ( $ className ) ; $ currentClass = $ rClass ; $ currentClassName = $ currentClass -> getName ( ) ; $ currentMethods = get_class_methods ( $ currentClass -> getName ( ) ) ; $ parentClass = $ currentClass -> getParentClass ( ) ; $ level = 1 ; while ( $ parentClass && $ level < 6 ) { $ parentClassName = $ parentClass -> getName ( ) ; if ( ! in_array ( $ currentClassName , array ( 'Mage_Core_Block_Abstract' , 'Mage_Core_Block_Template' ) ) ) { $ parentMethods = get_class_methods ( $ parentClassName ) ; $ tmp = array_diff ( $ currentMethods , $ parentMethods ) ; $ info [ $ currentClassName ] = array ( ) ; // render methods to "methodName($paramter1, $parameter2, ...)" foreach ( $ tmp as $ methodName ) { $ parameters = array ( ) ; foreach ( $ currentClass -> getMethod ( $ methodName ) -> getParameters ( ) as $ parameter ) { /* @var $parameter ReflectionParameter */ $ parameters [ ] = '$' . $ parameter -> getName ( ) ; } if ( count ( $ parameters ) > 3 ) { $ parameters = array_slice ( $ parameters , 0 , 2 ) ; $ parameters [ ] = '...' ; } $ info [ $ currentClassName ] [ ] = $ methodName . '(' . implode ( ', ' , $ parameters ) . ')' ; } } else { $ info [ $ currentClassName ] = array ( '(skipping)' ) ; $ parentMethods = array ( ) ; } $ level ++ ; $ currentClass = $ parentClass ; $ currentClassName = $ currentClass -> getName ( ) ; $ currentMethods = $ parentMethods ; $ parentClass = $ currentClass -> getParentClass ( ) ; } $ this -> classMethodCache [ $ className ] = $ info ; } return $ this -> classMethodCache [ $ className ] ; }
Get block methods (incl. methods of parent classes)

@param string $className
@return array
Get block methods ( incl . methods of parent classes )