+ return $this->generatePHPAutoload( $commandName, $fileinfo['filename'] );
+ }
+ }
+
+ /**
+ * Returns the filename of the extension.json of skin.json, if there's any, or
+ * otherwise the path to the autoload.php file in an array as the "filename"
+ * key and with the type (AutoloadGenerator::FILETYPE_JSON or AutoloadGenerator::FILETYPE_PHP)
+ * of the file as the "type" key.
+ *
+ * @return array
+ */
+ public function getTargetFileinfo() {
+ $fileinfo = [
+ 'filename' => $this->basepath . '/autoload.php',
+ 'type' => AutoloadGenerator::FILETYPE_PHP
+ ];
+ if ( file_exists( $this->basepath . '/extension.json' ) ) {
+ $fileinfo = [
+ 'filename' => $this->basepath . '/extension.json',
+ 'type' => AutoloadGenerator::FILETYPE_JSON
+ ];
+ } elseif ( file_exists( $this->basepath . '/skin.json' ) ) {
+ $fileinfo = [
+ 'filename' => $this->basepath . '/skin.json',
+ 'type' => AutoloadGenerator::FILETYPE_JSON
+ ];