You can create a new base controller class by extending Zend_Controller_Action. Put the new class file in your library under a folder named after your app.
MyApp/Controller/Action.php
PHP Code:
class MyApp_Controller_Action extends Zend_Controller_Action
{
function getPages($section, $page){ ... }
}
Then every controller you want to have access to this function extends your base controller instead of Zend's.
PHP Code:
class MyController extends MyApp_Controller_Action
{
public function indexAction()
{
$this->getPages(...)
}
}