PMA\libraries\DatabaseInterface::getProceduresOrFunctions PHP Method

getProceduresOrFunctions() public method

returns an array of PROCEDURE or FUNCTION names for a db
public getProceduresOrFunctions ( string $db, string $which, object $link = null ) : array
$db string db name
$which string PROCEDURE | FUNCTION
$link object mysql link
return array the procedure names or function names
    public function getProceduresOrFunctions($db, $which, $link = null)
    {
        $shows = $this->fetchResult('SHOW ' . $which . ' STATUS;', null, null, $link);
        $result = array();
        foreach ($shows as $one_show) {
            if ($one_show['Db'] == $db && $one_show['Type'] == $which) {
                $result[] = $one_show['Name'];
            }
        }
        return $result;
    }