Ankündigung

Einklappen
Keine Ankündigung bisher.

Suche Tool: Liste aller Funktionen/Methoden etc in (vielen) Dateien

Einklappen

Neue Werbung 2019

Einklappen
X
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • #16
    https://www.phpdoc.org/ - Docs generieren aus Quellcode

    Kommentar


    • #17
      https://www.phpdoc.org/ - Docs generieren aus Quellcode
      Ja, wenn du den Quellcode dafür vorbereitet hast.
      Sind die alle Funktionen so getaggt?

      PHP-Code:
      /**  
      * foo: liefert -$bar zurück.  
      * @author     Bla Bla  
      * @version    1.0  
      * @param      $bar     Ein beliebiger Wert  
      * @return     Der negative Eingabewert   */  

      function foo($bar) {     return -$bar;   }  
      Ich glaube nicht, dass die
      Programme so dokumentiert wurden.


      Code:
      List of tags
      
      
      api Methods declares that elements are suitable for consumption by third parties.
      author Any documents the author of the associated element.
      category File, Class groups a series of packages together.
      copyright Any documents the copyright information for the associated element.
      deprecated Any indicates that the associated element is deprecated and can be removed in a future version.
      example Any shows the code of a specified example file or, optionally, just a portion of it.
      filesource File includes the source of the current file for use in the output.
      global Variable informs phpDocumentor of a global variable or its usage.
      ignore Any tells phpDocumentor that the associated element is not to be included in the documentation.
      internal Any denotes that the associated elements is internal to this application or library and hides it by default.
      license File, Class indicates which license is applicable for the associated element.
      link Any indicates a relation between the associated element and a page of a website.
      method Class allows a class to know which ‘magic’ methods are callable.
      package File, Class categorizes the associated element into a logical grouping or subdivision.
      param Method, Function documents a single argument of a function or method.
      property Class allows a class to know which ‘magic’ properties are present.
      property-read Class allows a class to know which ‘magic’ properties are present that are read-only.
      property-write Class allows a class to know which ‘magic’ properties are present that are write-only.
      return Method, Function documents the return value of functions or methods.
      see Any indicates a reference from the associated element to a website or other elements.
      since Any indicates at which version the associated element became available.
      source Any, except File shows the source code of the associated element.
      subpackage File, Class categorizes the associated element into a logical grouping or subdivision.
      throws Method, Function indicates whether the associated element could throw a specific type of exception.
      todo Any indicates whether any development activity should still be executed on the associated element.
      uses Any indicates a reference to (and from) a single associated element.
      var Properties
      version Any indicates the current version of Structural Elements.
      Alle diese schönen Tags kannst du verwenden, damit du per PHPDOC deine Doku erzeugen kannst.
      Das must du aber erst mal in die alten PHP- Programme einpflegen.
      Dann weist du aber noch nicht, ob die Datei oder Funktion die du bearbeites überhaupt noch relevant ist.

      Ende. Such dir mal ne alte Installation und versuche das, dann melde dich wieder.

      Kommentar


      • #18
        PHPDoc hat der gute TE ja schon ausgeschlossen, gerp finde ich zu kurz gedacht - allenfalls awk .
        Aber wie gesagt, so richtig mitmachen tut der gute TE hier ja auch nicht.

        Kommentar


        • #19
          Natürlich nicht nur grep.. egrep, fgrep, cut, past, Mit awk kann einfach eine Umstellung und weitere Selektion erfolgen. Alles was an shelll-Commandos und Programmierug erorderlich ist will ich nicht aufzählem
          Da sich der TE nicht weiter geäussert hat ist für mich die Sache hie beendet.

          Bye

          Kommentar


          • #20
            Zitat von papalangi_44 Beitrag anzeigen
            Mit awk kann einfach (...) erfolgen.
            Bye
            Ich fand awk Nie einfach )
            ist aber fett mächtig, und zu busybox zeiten ging halt wenig anderes.
            Und tschüss bis zum nächten Thread

            Kommentar


            • #21
              bin gerade auf Reisen. melde mich demnächst. Danke für Euren Input, lese das durch und melde mich.
              Ich muss PHP im Kontext Home Automation nutzen (Vorgabe Hersteller und nicht zu ändern). Da kommt es leider ggf. auf ms an. Deshalb manche "seltsame" Frage.

              Kommentar


              • #22
                Alle Ordner und Dateien auflisten... => stackoverflow
                (ungetestet)
                PHP-Code:
                  <?php function getDirContents($dir, &$results = array()) {     $files scandir($dir);      foreach ($files as $key => $value) {         $path realpath($dir DIRECTORY_SEPARATOR $value);         if (!is_dir($path)) {             $results[] = $path;         } else if ($value != "." && $value != "..") {             getDirContents($path$results);             $results[] = $path;         }     }      return $results; }  var_dump(getDirContents('/xampp/htdocs/WORK'));
                Code:
                 
                 array (size=12)   0 => string '/xampp/htdocs/WORK/iframe.html' (length=30)   1 => string '/xampp/htdocs/WORK/index.html' (length=29)   2 => string '/xampp/htdocs/WORK/js' (length=21)   3 => string '/xampp/htdocs/WORK/js/btwn.js' (length=29)   4 => string '/xampp/htdocs/WORK/js/qunit' (length=27)   5 => string '/xampp/htdocs/WORK/js/qunit/qunit.css' (length=37)   6 => string '/xampp/htdocs/WORK/js/qunit/qunit.js' (length=36)   7 => string '/xampp/htdocs/WORK/js/unit-test.js' (length=34)   8 => string '/xampp/htdocs/WORK/xxxxx.js' (length=30)   9 => string '/xampp/htdocs/WORK/plane.png' (length=28)   10 => string '/xampp/htdocs/WORK/qunit.html' (length=29)   11 => string '/xampp/htdocs/WORK/styles.less' (length=30)
                Das Listing mit get_class_methods / php reflections und das lesen der Datei Zeilenweise mit der file Funktion.

                Das ganze funktioniert aber nur ohne Abhängigkeiten. Sobald du auch nur ein include irgendwo, ein use/trait in der Klasse hat, wird es sehr sehr komplex

                Alternativ => phpstorm
                Alternative 2 => https://github.com/jakobwesthoff/phuml << letzter push vor 4 Jahren

                Kommentar


                • #23
                  Zwischenmeldung.

                  Hallo & Danke für den Input.

                  s wird wohl leider noch eine Weile dauern, bis ich wirklich dazu komme, echt zu testen. Ich bin im Moment in Deutschland "gestrandet" und kann nicht zurück zu mir nach Hause (im Ausland), wo meine gesamte Habe ist. Da ich hier mit minimalistischer Ausstattung im Dachzimmer bei einem Freund "überlebe" bin ich gezwungen sehr kleine Brötchen zu backen und werde mich zwischenzeitlich mit Themen beschäftigen, die ich hier mit einem kleinen Notebook bearbeiten kann.
                  Ich muss PHP im Kontext Home Automation nutzen (Vorgabe Hersteller und nicht zu ändern). Da kommt es leider ggf. auf ms an. Deshalb manche "seltsame" Frage.

                  Kommentar


                  • #24
                    Vielleicht interessiert es nochmal irgendwann jemanden, daher nochmals eine Rückmeldung.

                    Da ich (noch) mit Windows Systemen arbeite waren die "IX"-basierten Hinweise für mich nicht umsetzbar. Nach nochmals einigem Suchen im Web bin ich auch nicht wirklich weiter gekommen. Also habe ich mir etwas selber gebaut. Das ist zwar höchst unvollständig und liefert bei Weitem nicht das, was ich mir erhofft hatte, aber es half mir dann doch relativ schnell, heraus zu finden, wie in etwa die Zusammenhänge sind.

                    Es wundert mich aber noch immer, dass es so etwas "simples" noch nicht als Standard-Lösung gibt. Es wäre doch m.E. - gerade bei fremdem Code - recht vereinfachend, wenn man sich, ausgehend von einem Startpunkt, schnell einen Überblick verschaffen könnte, was wo deklariert wird, welche "use" und includes es gibt etc. Ich hab' das Ding "Simplestrip" genannt ...


                    Meine kleine Lösung produziert - expemplarisch - den u.g. output. Ich habe bei mir die Extension "PHP" gewählt, auch wenn es eben KEIN PHP-Code mehr ist sondern eine normale Textdatei, weil dann die einzelnen Teile farblich so dargestellt werden, wie im PHP-Code selbst.

                    PHP-Code:
                    <?
                    file=C:\IPS\__SLOL_OO[==V1.01]\__SLOL_OO____ACER_V01.inc.php

                    [00013]     include_once "__SLOL_OO____ACER_TRAIT_CORE.obj.inc.php";
                    ............[00021] trait __SLOL_CORE
                    ............[00038]         protected static function INIT_CORE()
                    ............[00121]                 include self::$FILE['LOC_SETTINGS_USE'];
                    ............[00130]         public static function LOAD()
                    ............[00228]         public static function LOAD_CLASSES( $A_CLASS="" )
                    ............[00243]         protected static function CONFIG_GET_FILE( $_parameter_file="" )
                    ............[00263]         public static function CLASS_VARS_SETTER( $A_values )
                    ............[00297]         protected static function ImportArguments( $A_args, $A_delimiter="=", $A_log=true )
                    ............[00387]                 protected static function ImportArguments_CHILD( $A_key, $A_val )
                    ............[00392]                 protected static function ImportArgument_UNKNOWN( $_key, $_val, $A_delimiter, $_file, $_called, $_method )
                    ............[00402]         public static function ShowInternals( $A_show_vars=true, $A_marker="*" ) // READ OUT FUNCTION
                    ............[00411]         public static function ShowInternalVars( $A_marker="*", $A_vars_to_show="" ) // READ OUT FUNCTION
                    ............[00418]         public static function ShowInternalVars_CHILD_TOP( $_pre="*" ){}
                    ............[00419]         public static function ShowInternalVars_CHILD_BOT( $_pre="*" ){}
                    ............[00423]         public static function ShowInternalVar( $_var="" ) // READ OUT FUNCTION
                    ............[00429]                     public static function example( $___n="GENERAL" ) // STARTS EXAMPLE FILES
                    ............[00434]                                 include self::$DIR['_EXAMPLES'] . "__SLOL_OOA__EXAMPLE_STARTER.inc.php";
                    ............[00460]         public static function set()
                    ............[00469]         public static function SetPrm()
                    ............[00484]         protected static function domo_collect( $A_time="", $A_type="", $A_data="" )
                    ............[00505]         protected static function error( $A_err, $A_prm="", $A_Method="" )
                    ............[00541]         public static function err_collect( $A_err="", $A_type="", $A_prm="", $A_Method="" )
                    ............[00551]         public static function err_GetData()
                    ............[00557]         public static function err_report()
                    ............[00565]             public static function SELFCHECK( $arg="" )
                    ............[00567]                 include self::$DIR['_CORE'] . "__SLOL_OO__SELFCHECK.obj.inc.php";
                    ............[00572]         public static function help( $topic="GENERAL" ) // READ OUT FUNCTION
                    ............[00585]             public static function ArrayMergeRecursive( &$A_arr1, $A_arr2=array(), $A_merge_to_first=true )
                    ............[00617]             public static function ArrayMergeRecursive_MULTI()
                    ............[00643]         public static function TextArguments_Split( $A_args=array(), $A_delimiter="=", $A_do_special=true, $A_log=true )
                    ............[00696]         public static function ArgumentsToArray( $A_args=array(), $A_blank_1=true, $A_trans="", $A_log=true )
                    ............[00734]         public static function version_trait( $_out=true)

                    [00014]     include_once "__SLOL_OO____ACER_TRAIT_LOG_SIMPLE.inc.php";
                    ............[00012] trait __SLOL_LOG
                    ............[00019]         public static function log_INIT()
                    ............[00057]         public static function log( $A_tx, $A_cat="", $A_line=0, $A_file="", $A_time=0 )
                    ............[00065]         protected static function log_main( $A_tx, $A_cat="", $A_time=0, $A_line=0, $A_file="" )
                    ............[00101]         public static function log_array( $A_tx, $A_arr, $A_time=0, $A_line=0, $A_file="" )
                    ............[00112]         public static function log_method( $A_method, $A_tx="", $A_cat="", $A_file="", $A_nolog=false, $A_start=true )
                    ............[00133]         public static function log_method_end( $A_method, $A_tx="", $A_cat="", $A_file="", $A_nolog=false )
                    ............[00141]         public static function log_PHRASE( $A_phrase="", $A_tx="", $A_cat="", $A_line=0, $A_file="" )
                    ............[00149]         public static function log_GetReport(  $A_type="time", $_prm="", $_column_delimiter=" | ", $_out="echo", $_format_ms_digits=6 )
                    ............[00167]                                 include $_args['prm'];
                    ............[00172]                                 include $_include; // THIS SHALL DEFINE $report IF ECHO IS SWITCHED ON !!!
                    ............[00184]                             include $_inc;
                    ............[00208]         public static function log_GetData()

                    [00016] abstract class __SLOLV1
                    [00018]     use __SLOL_LOG; // METHODS FOR LOGGING, THEY WILL CALL LOG CLASS
                    [00019]     use __SLOL_CORE;
                    [00067]         public static function init_SLOLV1( )
                    [00092]                     include self::$FILE['SLOL_START_TEST_INC'];
                    [00102]         public static function version( $_out=true)
                    Ich muss PHP im Kontext Home Automation nutzen (Vorgabe Hersteller und nicht zu ändern). Da kommt es leider ggf. auf ms an. Deshalb manche "seltsame" Frage.

                    Kommentar


                    • #25
                      moinj jwka61
                      Da ich (noch) mit Windows Systemen arbeite waren die "IX"-basierten Hinweise für mich nicht umsetzbar.
                      hab den IX_ basierten Hunweis nicht gefuden
                      nebenbei erwähnt:
                      .unix tools wie grep und wak gibt es auch für windows.
                      in einer reinen klicke umgebung tolls für sowas zu finden ist auch eher unwahscheinlich.


                      faszinierenderweise hast du wohl weder deine sorgen korrekt beschreiben, noch code geliefert , dabei ,lässt sich obige ausgabe gut mit php realisieren.
                      im von dir immer wieder verschmähten announce steht auch was von Code.....


                      aber wen kümmmern schon regeln

                      Kommentar


                      • #26
                        tomBuilder Sein Vorhaben und seine Sorgen hat er doch ausgiebig beschrieben. Und x Hinweise erhalten, welche er auf Grund seiner speziellen Anforderungen alle verworfen hat.
                        Nun hat er sich was eigenes geschaffen und seine spezielle Lösung vorgestellt. Dagegen ist doch erstmal nichts einzuwenden.

                        xm22 hat die Problematik doch hier schon auf den Punkt gebracht:
                        Zitat von xm22 Beitrag anzeigen
                        @jwka61: ehrlich gesagt, bin ich auf diese Art und Weise noch nie in ein Projekt eingestiegen. Was willst du mit der Info, was es alles gibt? Da fehlt dir doch für alles der Kontext.
                        Seine Lösung macht nur Sinn wenn alle Komponenten im gleichen Kontext stehen. Das trifft aber auf die wenigsten Entwickler zu. So habe ich als Beispiel in fast jeder PHP-Klassse eine oder mehrere create-Methoden. Diese stehen aber alle in einen unterschiedlichen Kontext. Eine Aufstellung in welchen PHP-Dateien überall eine create-Methode steckt macht für mich daher keinen Sinn. Wenn jwka61 so etwas braucht und es hilft ihm ist es doch ok.

                        Kommentar


                        • #27
                          gut jspit dann habe ich ihn immernoch verstanden.

                          wie dem auch sei, so komplex wie ich dachte ist die ausgabe nicht, und da er wohl kein sed nutzt würde ich gerne wissen ob das mit findstr bpsw machbar/wie machbar ist.

                          Kommentar


                          • #28
                            Ich wollte eigentlich nur Rückmeldung geben, dass für mich die Sache soweit erst mal erledigt ist und es nicht irgendwann heißt: "Der sagt nicht mal was". War also eher eine "thread kann geschlossen werden" Meldung.

                            Dass das natürlich einem hohen Anspruch nicht gerecht wird, ist mir klar. Für das, was ich will, tut's diese Ausgabe und das Script aber. Sollte wirklich Interesse an meinem Spaghetti-Code bestehen, poste/schicke ich ihn gern zu.
                            Ich muss PHP im Kontext Home Automation nutzen (Vorgabe Hersteller und nicht zu ändern). Da kommt es leider ggf. auf ms an. Deshalb manche "seltsame" Frage.

                            Kommentar

                            Lädt...
                            X