Skip to content

Commit

Permalink
Basic setup for MetaStorm (#20307)
Browse files Browse the repository at this point in the history
  • Loading branch information
xepozz authored Jan 12, 2025
1 parent f94017c commit fd866da
Show file tree
Hide file tree
Showing 7 changed files with 412 additions and 0 deletions.
41 changes: 41 additions & 0 deletions framework/base/controller.meta-storm.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0"?>
<meta-storm xmlns="meta-storm">
<definitions>
<classMethod class="\yii\base\Controller" method="render" argument="0">
<files extension="php" relatedTo="file">
<directoryProcessors>
<regexp from="Controller\.php" to=""/>
<regexp from="([a-z])([A-Z])" to="$1-$2"/>
<regexp from="/controllers/" to="/views/"/>
<regexp from="/modules/([^\\/]+)/controllers/"
to="/themes/${yiisoft/yii2:view-theme}/modules/$1/views/"/>
</directoryProcessors>
</files>
</classMethod>
<classMethod class="\yii\base\Controller" method="renderPartial" argument="0">
<files extension="php" relatedTo="file">
<directoryProcessors>
<regexp from="Controller\.php" to=""/>
<regexp from="([a-z])([A-Z])" to="$1-$2"/>
<regexp from="/controllers/" to="/views/"/>
<regexp from="/modules/([^\\/]+)/controllers/"
to="/themes/${yiisoft/yii2:view-theme}/modules/$1/views/"/>
</directoryProcessors>
</files>
</classMethod>
<classMethod class="\yii\base\Controller" method="renderFile" argument="0">
<files extension="" relatedTo="file">
<directoryProcessors>
<regexp from="Controller\.php" to=""/>
<regexp from="([a-z])([A-Z])" to="$1-$2"/>
<regexp from="/controllers/" to="/views/"/>
<regexp from="/modules/([^\\/]+)/controllers/"
to="/themes/${yiisoft/yii2:view-theme}/modules/$1/views/"/>
</directoryProcessors>
</files>
</classMethod>
</definitions>
<envs>
<env name="yiisoft/yii2:view-theme" value="default"/>
</envs>
</meta-storm>
65 changes: 65 additions & 0 deletions framework/base/model.meta-storm.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?xml version="1.0"?>
<meta-storm xmlns="meta-storm">
<definitions>
<classMethod class="\yii\base\Model" method="validate" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
<classMethod class="\yii\base\Model" method="getActiveValidators" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
<classMethod class="\yii\base\Model" method="isAttributeRequired" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
<classMethod class="\yii\base\Model" method="isAttributeSafe" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
<classMethod class="\yii\base\Model" method="isAttributeActive" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
<classMethod class="\yii\base\Model" method="getAttributeLabel" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
<classMethod class="\yii\base\Model" method="getAttributeHint" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
<classMethod class="\yii\base\Model" method="hasErrors" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
<classMethod class="\yii\base\Model" method="getErrors" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
<classMethod class="\yii\base\Model" method="getFirstError" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
<classMethod class="\yii\base\Model" method="addError" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
<classMethod class="\yii\base\Model" method="clearErrors" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
<classMethod class="\yii\base\Model" method="generateAttributeLabel" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
<classMethod class="\yii\base\Model" method="onUnsafeAttribute" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
<classMethod class="\yii\base\Model" method="getAttributeLabel" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
<classMethod class="\yii\base\Model" method="getAttributeLabel" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
<classMethod class="\yii\base\Model" method="getAttributeLabel" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
<classMethod class="\yii\base\Model" method="getAttributeLabel" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
<classMethod class="\yii\base\Model" method="getAttributeLabel" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
<classMethod class="\yii\base\Model" method="getAttributeLabel" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
</definitions>
</meta-storm>
79 changes: 79 additions & 0 deletions framework/db/active-record.meta-storm.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<?xml version="1.0"?>
<meta-storm xmlns="meta-storm">
<definitions>
<classMethod class="\yii\db\BaseActiveRecord" method="canGetProperty" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
<classMethod class="\yii\db\BaseActiveRecord" method="canSetProperty" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
<classMethod class="\yii\db\BaseActiveRecord" method="__get" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
<classMethod class="\yii\db\BaseActiveRecord" method="__set" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
<classMethod class="\yii\db\BaseActiveRecord" method="__isset" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
<classMethod class="\yii\db\BaseActiveRecord" method="__unset" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>

<classMethod class="\yii\db\BaseActiveRecord" method="hasAttribute" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
<classMethod class="\yii\db\BaseActiveRecord" method="getAttribute" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
<classMethod class="\yii\db\BaseActiveRecord" method="setAttribute" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
<classMethod class="\yii\db\BaseActiveRecord" method="getOldAttribute" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
<classMethod class="\yii\db\BaseActiveRecord" method="setOldAttribute" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
<classMethod class="\yii\db\BaseActiveRecord" method="canSetOldAttribute" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
<classMethod class="\yii\db\BaseActiveRecord" method="markAttributeDirty" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
<classMethod class="\yii\db\BaseActiveRecord" method="isAttributeChanged" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
<classMethod class="\yii\db\BaseActiveRecord" method="markAttributeDirty" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
<classMethod class="\yii\db\BaseActiveRecord" method="resetDependentRelations" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
<classMethod class="\yii\db\BaseActiveRecord" method="setRelationDependencies" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>

<classMethod class="\yii\base\Model" method="getAttributeLabel" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
<classMethod class="\yii\base\Model" method="getAttributeHint" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
<classMethod class="\yii\base\Model" method="getAttributeLabel" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
<classMethod class="\yii\base\Model" method="getAttributeLabel" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
<classMethod class="\yii\base\Model" method="getAttributeLabel" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
<classMethod class="\yii\base\Model" method="getAttributeLabel" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
<classMethod class="\yii\base\Model" method="getAttributeLabel" argument="0">
<properties protected="false" private="false" xpath="$variable"/>
</classMethod>
</definitions>
</meta-storm>
20 changes: 20 additions & 0 deletions framework/helpers/array.meta-storm.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0"?>
<meta-storm xmlns="meta-storm">
<definitions>
<classMethod class="\yii\helpers\BaseArrayHelper" method="getValue" argument="1">
<properties protected="false" private="false" relatedArgument="0" relatedTo="argument"/>
</classMethod>
<classMethod class="\yii\helpers\BaseArrayHelper" method="index" argument="1">
<properties protected="false" private="false" relatedArgument="0" relatedTo="argument"/>
</classMethod>
<classMethod class="\yii\helpers\BaseArrayHelper" method="getColumn" argument="1">
<properties protected="false" private="false" relatedArgument="0" relatedTo="argument"/>
</classMethod>
<classMethod class="\yii\helpers\BaseArrayHelper" method="map" argument="1">
<properties protected="false" private="false" relatedArgument="0" relatedTo="argument"/>
</classMethod>
<classMethod class="\yii\helpers\BaseArrayHelper" method="map" argument="2">
<properties protected="false" private="false" relatedArgument="0" relatedTo="argument"/>
</classMethod>
</definitions>
</meta-storm>
Loading

0 comments on commit fd866da

Please sign in to comment.