src/Textpattern/Composer/Installer/Plugin/Package.php
protected function find($directory)
    {
        if ($iterator = parent::find($directory)) {
            foreach ($iterator as $file) {
                if (is_file($file) && is_readable($file) && $contents = file_get_contents($file)) {
                    if (preg_match($this->packageNamePattern, basename($file))) {
                        $plugin = (object) null;
                        $plugin->name = implode('_v', array_slice(explode('_v', basename($file, '.txt')), 0, -1));
                        $this->plugin[] = $plugin;
                        $this->package[] = $contents;
                    }
                }
            }
        }

        return !empty($this->plugin);
    }
protected function find($directory)
    {
        if ($iterator = parent::find($directory)) {
            foreach ($iterator as $file) {
                if (is_file($file) && is_readable($file) && $contents = file_get_contents($file)) {
                    if (preg_match($this->packageNamePattern, basename($file))) {
                        $plugin = (object) null;
                        $plugin->name = implode('_v', array_slice(explode('_v', basename($file, '.txt')), 0, -1));
                        $this->plugin[] = $plugin;
                        $this->package[] = $contents;
                    }
                }
            }
        }

        return !empty($this->plugin);
    }
protected function find ( $ directory ) { if ( $ iterator = parent :: find ( $ directory ) ) { foreach ( $ iterator as $ file ) { if ( is_file ( $ file ) && is_readable ( $ file ) && $ contents = file_get_contents ( $ file ) ) { if ( preg_match ( $ this -> packageNamePattern , basename ( $ file ) ) ) { $ plugin = ( object ) null ; $ plugin -> name = implode ( '_v' , array_slice ( explode ( '_v' , basename ( $ file , '.txt' ) ) , 0 , - 1 ) ) ; $ this -> plugin [ ] = $ plugin ; $ this -> package [ ] = $ contents ; } } } } return ! empty ( $ this -> plugin ) ; }
Finds plugin packages.

@param  string $directory
@return bool
Finds plugin packages .