Generates FileTrailer registry

@return string
435708
protected function generateFileTrailer()
    {
        $format = '%03.3s%04.4s%01.1s%-9.9s%06.6s%06.6s%06.6s%-205.205s';

        $data = [
            $this->shipping_file->assignment->bank->code,
            '9999',
            '9',
            '',
            $this->lot_count,
            $this->registry_count,
            '0',
            '',
        ];

        return vsprintf($format, static::normalize($data));
    }
1152719
public function generate()
    {
        if (false === file_exists($this->directoryName) || false === is_dir($this->directoryName)) {
            throw new FileNotFoundException(sprintf('The directory "%s" does not exist.', $this->directoryName));
        }

        $finder = (new Finder())->files()->in($this->directoryName)->depth('< 1');
        $parameters = [];

        foreach ($finder as $file) {
            $yaml = Yaml::parse($this->getFrontMatter($file));
            $parameter = [];
            foreach ($yaml as $key => $value) {
                if (null === $this->parameters || true === in_array($key, $this->parameters)) {
                    $parameter[$key] = $value;
                }
            }
            $parameters[] = $parameter;
        }

        return $parameters;
    }
293620
private function getFileTemplate()
    {
        $content = FormatFileContent::createObject();
        $content->addItem('<?php');
        $content->addItem(
            sprintf(
                '/**Migration file generated at %s on %s by PowerOrm(%s)*/',
                date('h:m:i'),
                date('D, jS F Y'),
                POWERORM_VERSION
            ).PHP_EOL
        );

        $content->addItem('namespace %s;'.PHP_EOL);

        $content->addItem('use Eddmash\\PowerOrm\\Migration\\Migration;');
        $content->addItem('%s');

        $content->addItem('class %s extends Migration{'.PHP_EOL);

        $content->addIndent();
        $content->addItem('public function getDependency(){');

        $content->addIndent();
        $content->addItem('return [');

        $content->addItem('%s');

        $content->addItem('];');
        $content->reduceIndent();

        $content->addItem('}'.PHP_EOL);

        $content->addItem('public function getOperations(){');

        $content->addIndent();
        $content->addItem('return %s ;');
        $content->reduceIndent();

        $content->addItem('}'.PHP_EOL);
        $content->reduceIndent();

        $content->addItem('}');

        return $content;
    }
1280789
protected function generateLotTrailer()
    {
        $format = '%03.3s%04.4s%01.1s%-9.9s%06.6s%06.6s%017.17s%06.6s%017.17s'
            . '%06.6s%017.17s%06.6s%017.17s%-8.8s%-117.117s';

        $data = [
            $this->shipping_file->assignment->bank->code,
            $this->lot_count,
            '5',
            '',
            $this->current_lot,
            '0', // CS
            '0', // CS
            '0', // CV
            '0', // CV
            '0', // CC
            '0', // CC
            '0', // CD
            '0', // CD
            '',
            '',
        ];

        return vsprintf($format, static::normalize($data));
    }
598576
public function getFileManager()
    {
        if ($this->file_manager_instance === null) {
            $this->file_manager_instance = new FileManager($this);
        }

        return $this->file_manager_instance;
    }
103296
public function manifestIndexFile()
    {
        $basePath = $this->manifestFilePath ?: $this->config()->compile_path . $this->prefix();
        $indexFile = $basePath . '/' . $this->manifestFileName . '.yml';
        return $indexFile;
    }
934243
public function getGeneratorStrategy()
    {
        if (!isset($this->generatorStrategy)) {
            $this->generatorStrategy = new FileWriterGeneratorStrategy(new FileLocator($this->getPath()));
        }

        return $this->generatorStrategy;
    }
260935
public function getXSendfileNginx(){
      $xsendfileNginx = array();
      foreach ( $this->_xsendfileNginx as $location => $root ){
        $root = (string)$root;
        $location = rtrim((string)$location,'/').'/';
        if ( substr($root,-1,1) != '/' && substr($root,-1,1) != '\\') {
          // root and location paths are concatenated
          // @see http://wiki.nginx.org/XSendfile
          $root = CKFinder_Connector_Utils_FileSystem::combinePaths(rtrim($root,'/'),$location);
        }
        $xsendfileNginx[$location] = $root;
      }
      return $xsendfileNginx;
    }
95958
protected function getEnvironmentFile()
    {
        return $this->compiler->compile(
            $this->filesystem->get($this->getSocialiteEnvironmentStubFile()),
            [
                strtoupper($this->socialNetwork) . '_OAUTH_APP_ID' => $this->oauthApp->getId(),
                strtoupper($this->socialNetwork) . '_OAUTH_APP_SECRET' => $this->oauthApp->getSecret(),
                strtoupper($this->socialNetwork) . '_OAUTH_APP_REDIRECT_URL' => $this->oauthApp->getRedirectUrl(),
            ]
        );
    }
974082
public function getRegistrar()
    {
        if (isset($this->registrar)) {
            return $this->registrar;
        }

        return $this->registrar = new ResourceRegistrar($this);
    }
83674
public function getLoader()
    {
        if (null === $this->loader) {
            if (strpos('@PHP-BIN@', '@PHP-BIN') === 0) {
                $base = dirname(__FILE__) . '/';
                set_include_path($base . PATH_SEPARATOR . get_include_path());
            } else {
                $base = '@PEAR-DIR@/Phrozn/';
            }

            //Autoload candidates.
            $dirs = array($base . '..', getcwd());

            foreach ($dirs as $dir) {
                $file = $dir . '/vendor/autoload.php';
                if (file_exists($file)) {
                    $this->loader = include $file;
                    break;
                }
            }

            if (null === $this->loader) {
                throw new \RuntimeException("Unable to locate autoloader.");
            }
        }

        return $this->loader;
    }
578495
public function managerGetRegistrations()
    {
        $registrations = $this->getRegistrations();

        $regInfo = [];
        /** @var Registration $reg */
        foreach ($registrations as $reg) {
            $regInfo[] = [
                'id'                    => $reg->getId(),
                'invoke'                => $reg->getInvokeType(),
                'thruway_multiregister' => $reg->getAllowMultipleRegistrations(),
                'disclose_caller'       => $reg->getDiscloseCaller(),
                'session'               => $reg->getSession()->getSessionId(),
                'authid'                => $reg->getSession()->getAuthenticationDetails()->getAuthId(),
                'statistics'            => $reg->getStatistics()
            ];
        }
    }
1004921
public function getHideFilesRegex()
    {
        static $fileRegex;

        if (!isset($fileRegex)) {
            if (is_array($this->_hideFiles) && $this->_hideFiles) {
                $fileRegex = join("|", $this->_hideFiles);
                $fileRegex = strtr($fileRegex, array("?" => "__QMK__", "*" => "__AST__", "|" => "__PIP__"));
                $fileRegex = preg_quote($fileRegex, "/");
                $fileRegex = strtr($fileRegex, array("__QMK__" => ".", "__AST__" => ".*", "__PIP__" => "|"));
                $fileRegex = "/^(?:" . $fileRegex . ")$/uim";
            }
            else {
                $fileRegex = "";
            }
        }

        return $fileRegex;
    }
341850
public function getCsvImportFilename()
    {
        $feed = RegistryImportFeed::singleton();

        return sprintf('%s/%s', $feed->getStoragePath($this->modelClass), $feed->getImportFilename());
    }
23184
public static function getInstance()
    {
        return new GeneratorFinderCache(
            new GeneratorFinder(
                TranstyperFactory::getInstance(),
                GeneratorValidatorFactory::getInstance(),
                new FileManager()
            ),
            Installer::getDirectories(),
            new FileManager()
        );
    }
779679
public static function getRegisteredWrappers()
    {
        if (static::$wrapperRegistry === null) {
            static::$wrapperRegistry = [];

            if (extension_loaded('intl')) {
                static::$wrapperRegistry[] = 'Zend\Stdlib\StringWrapper\Intl';
            }

            if (extension_loaded('mbstring')) {
                static::$wrapperRegistry[] = 'Zend\Stdlib\StringWrapper\MbString';
            }

            if (extension_loaded('iconv')) {
                static::$wrapperRegistry[] = 'Zend\Stdlib\StringWrapper\Iconv';
            }

            static::$wrapperRegistry[] = 'Zend\Stdlib\StringWrapper\Native';
        }

        return static::$wrapperRegistry;
    }
981824
public function getAvailableOverrides()
    {
        $path   = $this->getPath();
        $suffix = $this->getSuffix();

        $glob   = "{$path}/*{$suffix}";
        $result = [];
        foreach (glob($glob) as $file) {
            $identifier          = basename($file, $suffix);
            $result[$identifier] = $file;
        }

        return $result;
    }