File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
astroid/astroid-framework/framework Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -899,4 +899,12 @@ public static function getPropertySet($property)
899899 break ;
900900 }
901901 }
902+
903+ public static function frameworkVersion ()
904+ {
905+ $ xml = JFactory::getXML (JPATH_ADMINISTRATOR . '/manifests/libraries/astroid.xml ' );
906+ $ version = (string ) $ xml ->version ;
907+ return $ version ;
908+ }
909+
902910}
Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ class AstroidFrameworkTemplate
1717 public $ params ;
1818 public $ language ;
1919 public $ title = "" ;
20+ public $ version = "" ;
21+ public $ astroidVersion = "" ;
2022 public $ direction ;
2123 protected $ logs ;
2224 protected $ debug = false ;
@@ -44,8 +46,18 @@ public function __construct($template)
4446 $ language = JFactory::getApplication ()->getLanguage ();
4547 $ this ->language = $ language ->getTag ();
4648 $ this ->direction = $ language ->isRtl () ? 'rtl ' : 'ltr ' ;
49+ $ this ->version = $ this ->templateVersion ();
50+ $ this ->astroidVersion = AstroidFrameworkHelper::frameworkVersion ();
4751 $ this ->initAgent ();
4852 $ this ->addMeta ();
53+ $ this ->inspect ();
54+ }
55+
56+ public function templateVersion ()
57+ {
58+ $ xml = JFactory::getXML (JPATH_SITE . "/templates/ {$ this ->template }/templateDetails.xml " );
59+ $ version = (string ) $ xml ->version ;
60+ return $ version ;
4961 }
5062
5163 public function addMeta ()
@@ -1042,6 +1054,12 @@ public function getPresets()
10421054 }
10431055 return $ presets ;
10441056 }
1057+
1058+ public function inspect ()
1059+ {
1060+ // $this->version;
1061+ // $this->astroidVersion;
1062+ }
10451063}
10461064
10471065class AstroidLog
You can’t perform that action at this time.
0 commit comments