app/code/community/Nexcessnet/Turpentine/Helper/Data.php
protected function _getChildBlockNames($blockNode) {
        Varien_Profiler::start('turpentine::helper::data::_getChildBlockNames');
        if ($blockNode instanceof Mage_Core_Model_Layout_Element) {
            $blockNames = array((string) $blockNode['name']);
            foreach ($blockNode->xpath('./block | ./reference') as $childBlockNode) {
                $blockNames = array_merge($blockNames,
                    $this->_getChildBlockNames($childBlockNode));
                if ($this->getLayout() instanceof Varien_Simplexml_Config) {
                    foreach ($this->getLayout()->getNode()->xpath(sprintf(
                        '//reference[@name=\'%s\']', (string) $childBlockNode['name'] ))
                            as $childBlockLayoutNode) {
                        $blockNames = array_merge($blockNames,
                            $this->_getChildBlockNames($childBlockLayoutNode));

                    }
                }
            }
        } else {
            $blockNames = array();
        }
        Varien_Profiler::stop('turpentine::helper::data::_getChildBlockNames');
        return $blockNames;
    }
protected function _getChildBlockNames($blockNode) {
        Varien_Profiler::start('turpentine::helper::data::_getChildBlockNames');
        if ($blockNode instanceof Mage_Core_Model_Layout_Element) {
            $blockNames = array((string) $blockNode['name']);
            foreach ($blockNode->xpath('./block | ./reference') as $childBlockNode) {
                $blockNames = array_merge($blockNames,
                    $this->_getChildBlockNames($childBlockNode));
                if ($this->getLayout() instanceof Varien_Simplexml_Config) {
                    foreach ($this->getLayout()->getNode()->xpath(sprintf(
                        '//reference[@name=\'%s\']', (string) $childBlockNode['name'] ))
                            as $childBlockLayoutNode) {
                        $blockNames = array_merge($blockNames,
                            $this->_getChildBlockNames($childBlockLayoutNode));

                    }
                }
            }
        } else {
            $blockNames = array();
        }
        Varien_Profiler::stop('turpentine::helper::data::_getChildBlockNames');
        return $blockNames;
    }
protected function _getChildBlockNames ( $ blockNode ) { Varien_Profiler :: start ( 'turpentine::helper::data::_getChildBlockNames' ) ; if ( $ blockNode instanceof Mage_Core_Model_Layout_Element ) { $ blockNames = array ( ( string ) $ blockNode [ 'name' ] ) ; foreach ( $ blockNode -> xpath ( './block | ./reference' ) as $ childBlockNode ) { $ blockNames = array_merge ( $ blockNames , $ this -> _getChildBlockNames ( $ childBlockNode ) ) ; if ( $ this -> getLayout ( ) instanceof Varien_Simplexml_Config ) { foreach ( $ this -> getLayout ( ) -> getNode ( ) -> xpath ( sprintf ( '//reference[@name=\'%s\']' , ( string ) $ childBlockNode [ 'name' ] ) ) as $ childBlockLayoutNode ) { $ blockNames = array_merge ( $ blockNames , $ this -> _getChildBlockNames ( $ childBlockLayoutNode ) ) ; } } } } else { $ blockNames = array ( ) ; } Varien_Profiler :: stop ( 'turpentine::helper::data::_getChildBlockNames' ) ; return $ blockNames ; }
The actual recursive implementation of getChildBlockNames

@param  Mage_Core_Model_Layout_Element $blockNode
@return array
The actual recursive implementation of getChildBlockNames