protected function findHooksInApiFile($moduleInstance)
    {
        $finder = new Finder();
        $files = $finder->files()
            ->name("{$moduleInstance->info['name']}.api.php")
            ->in($moduleInstance->getPath());

        foreach ($files as $file) {
            $functions = $this->getFileFunctions($file->getPathname());
            foreach ($functions as $function) {
                if (Unicode::strpos($function, 'hook')) {
                    $this->addHook($function);
                }
            }

        }
    }
protected function findHooksInApiFile($moduleInstance)
    {
        $finder = new Finder();
        $files = $finder->files()
            ->name("{$moduleInstance->info['name']}.api.php")
            ->in($moduleInstance->getPath());

        foreach ($files as $file) {
            $functions = $this->getFileFunctions($file->getPathname());
            foreach ($functions as $function) {
                if (Unicode::strpos($function, 'hook')) {
                    $this->addHook($function);
                }
            }

        }
    }
protected function findHooksInApiFile ( $ moduleInstance ) { $ finder = new Finder ( ) ; $ files = $ finder -> files ( ) -> name ( "{$moduleInstance->info['name']}.api.php" ) -> in ( $ moduleInstance -> getPath ( ) ) ; foreach ( $ files as $ file ) { $ functions = $ this -> getFileFunctions ( $ file -> getPathname ( ) ) ; foreach ( $ functions as $ function ) { if ( Unicode :: strpos ( $ function , 'hook' ) ) { $ this -> addHook ( $ function ) ; } } } }
Gets gooks from api file of the module.

@param $moduleInstance
Module instance.
Gets gooks from api file of the module .