Table of Contents
yii2源码学习笔记(十四),yii2源码学习笔记
Home php教程 php手册 yii2源码学习笔记(十四),yii2源码学习笔记

yii2源码学习笔记(十四),yii2源码学习笔记

Jun 13, 2016 am 08:38 AM
module yii2 and study application yes module Source code of notes kind

yii2源码学习笔记(十四),yii2源码学习笔记

Module类是模块和应用类的基类。  yiisoft\yii2\base\Module.php

<span>  1</span> <?<span>php
</span><span>  2</span> <span>/*</span><span>*
</span><span>  3</span> <span> * @link </span><span>http://www.yiiframework.com/</span>
<span>  4</span> <span> * @copyright Copyright (c) 2008 Yii Software LLC
</span><span>  5</span> <span> * @license </span><span>http://www.yiiframework.com/license/</span>
<span>  6</span>  <span>*/</span>
<span>  7</span> 
<span>  8</span> <span>namespace</span> yii\<span>base</span><span>;
</span><span>  9</span> 
<span> 10</span> <span>use Yii;
</span><span> 11</span> <span>use yii\di\ServiceLocator;
</span><span> 12</span> 
<span> 13</span> <span>/*</span><span>*
</span><span> 14</span> <span> * Module is the base class for module and application classes.
</span><span> 15</span> <span> *  Module是模块和应用类的基类
</span><span> 16</span> <span> * A module represents a sub-application which contains MVC elements by itself, such as
</span><span> 17</span> <span> * models, views, controllers, etc.
</span><span> 18</span> <span> * 模块是一个由模型、视图、控制器等组成的子应用
</span><span> 19</span> <span> * A module may consist of [[modules|sub-modules]].
</span><span> 20</span> <span> * 模块内也可以包含模块或子模块
</span><span> 21</span> <span> * [[components|Components]] may be registered with the module so that they are globally
</span><span> 22</span> <span> * accessible within the module.
</span><span> 23</span> <span> * 组件可以注册到模块,以便在模块内全局访问
</span><span> 24</span> <span> * @property array $aliases List of path aliases to be defined. The array keys are alias names (must start
</span><span> 25</span> <span> * with '@') and the array values are the corresponding paths or aliases. See [[setAliases()]] for an example.
</span><span> 26</span> <span> * This property is write-only. 要定义的别名路径数组    只写
</span><span> 27</span> <span> * @property string $basePath The root directory of the module. 模块的根路径
</span><span> 28</span> <span> * @property string $controllerPath The directory that contains the controller classes. This property is
</span><span> 29</span> <span> * read-only.   控制器类的路径 只读
</span><span> 30</span> <span> * @property string $layoutPath The root directory of layout files. Defaults to "[[viewPath]]/layouts".
</span><span> 31</span> <span> * 模板路径数组 只读
</span><span> 32</span> <span> * @property array $modules The modules (indexed by their IDs). 模块数组
</span><span> 33</span> <span> * @property string $uniqueId The unique ID of the module. This property is read-only.模块的唯一标识 只读
</span><span> 34</span> <span> * @property string $viewPath The root directory of view files. Defaults to "[[basePath]]/views".
</span><span> 35</span> <span> * 模块下视图文件路径
</span><span> 36</span> <span> * @author Qiang Xue <qiang.xue@gmail.com>
</span><span> 37</span> <span> * @since 2.0
</span><span> 38</span>  <span>*/</span>
<span> 39</span> <span>class</span><span> Module extends ServiceLocator
</span><span> 40</span> <span>{
</span><span> 41</span>     <span>/*</span><span>*
</span><span> 42</span> <span>     * @event ActionEvent an event raised before executing a controller action. 在执行控制的的action方法前触发
</span><span> 43</span> <span>     * You may set [[ActionEvent::isValid]] to be false to cancel the action execution.
</span><span> 44</span> <span>     * 可以设置[[ActionEvent::isValid]]为false取消行动的执行。
</span><span> 45</span>      <span>*/</span>
<span> 46</span>     <span>const</span> EVENT_BEFORE_ACTION = <span>'</span><span>beforeAction</span><span>'</span><span>;
</span><span> 47</span>     <span>/*</span><span>*
</span><span> 48</span> <span>     * @event ActionEvent an event raised after executing a controller action.
</span><span> 49</span> <span>     * 在执行控制的的action方法后触发
</span><span> 50</span> <span>     * 
</span><span> 51</span>      <span>*/</span>
<span> 52</span>     <span>const</span> EVENT_AFTER_ACTION = <span>'</span><span>afterAction</span><span>'</span><span>;
</span><span> 53</span> 
<span> 54</span>     <span>/*</span><span>*
</span><span> 55</span> <span>     * @var array custom module parameters (name => value). 自定义模块参数
</span><span> 56</span>      <span>*/</span>
<span> 57</span>     <span>public</span> $<span>params</span> =<span> [];
</span><span> 58</span>     <span>/*</span><span>*
</span><span> 59</span> <span>     * @var string an ID that uniquely identifies this module among other modules which have the same [[module|parent]].
</span><span> 60</span> <span>     * 模块的唯一标识,用于区分同一父模块下的模块
</span><span> 61</span>      <span>*/</span>
<span> 62</span>     <span>public</span><span> $id;
</span><span> 63</span>     <span>/*</span><span>*
</span><span> 64</span> <span>     * @var Module the parent module of this module. Null if this module does not have a parent.
</span><span> 65</span> <span>     *  当前模块的父模块
</span><span> 66</span>      <span>*/</span>
<span> 67</span>     <span>public</span><span> $module;
</span><span> 68</span>     <span>/*</span><span>*
</span><span> 69</span> <span>     * @var string|boolean the layout that should be applied for views within this module. This refers to a view name
</span><span> 70</span> <span>     * relative to [[layoutPath]]. If this is not set, it means the layout value of the [[module|parent module]]
</span><span> 71</span> <span>     * will be taken. If this is false, layout will be disabled within this module.
</span><span> 72</span> <span>     * 布局文件 如果没有设置,调用 [[module|parent module]]的值。如果是false,在模块中布局将被禁用。
</span><span> 73</span>      <span>*/</span>
<span> 74</span>     <span>public</span><span> $layout;
</span><span> 75</span>     <span>/*</span><span>*
</span><span> 76</span> <span>     * @var array mapping from controller ID to controller configurations. 控制器ID到控制器配置的映射
</span><span> 77</span> <span>     * Each name-value pair specifies the configuration of a single controller.
</span><span> 78</span> <span>     * A controller configuration can be either a string or an array.
</span><span> 79</span> <span>     * If the former, the string should be the fully qualified class name of the controller.
</span><span> 80</span> <span>     * If the latter, the array must contain a 'class' element which specifies
</span><span> 81</span> <span>     * the controller's fully qualified class name, and the rest of the name-value pairs
</span><span> 82</span> <span>     * in the array are used to initialize the corresponding controller properties. For example,
</span><span> 83</span> <span>     * 每个键值对指定单独的控制器,控制器配置可以是字符串或者数组,如果是前者,该字符串是指定控制的的全路径
</span><span> 84</span> <span> 95  * 如果是后者,则包含一个&lsquo;class&rsquo;元素指定控制器的全路径,其余的参数用于初始化对应的属性
</span><span> 85</span> <span>     * ~~~
</span><span> 86</span> <span>     * [
</span><span> 87</span> <span>     *   'account' => 'app\controllers\UserController',
</span><span> 88</span> <span>     *   'article' => [
</span><span> 89</span> <span>     *      'class' => 'app\controllers\PostController',
</span><span> 90</span> <span>     *      'pageTitle' => 'something new',
</span><span> 91</span> <span>     *   ],
</span><span> 92</span> <span>     * ]
</span><span> 93</span> <span>     * ~~~
</span><span> 94</span>      <span>*/</span>
<span> 95</span>     <span>public</span> $controllerMap =<span> [];
</span><span> 96</span>     <span>/*</span><span>*
</span><span> 97</span> <span>     * @var string the namespace that controller classes are in.    控制器的命名空间
</span><span> 98</span> <span>     * This namespace will be used to load controller classes by prepending it to the controller
</span><span> 99</span> <span>     * class name.
</span><span>100</span> <span>     * 命名空间 在控制器类的前面加载控制器类
</span><span>101</span> <span>     * If not set, it will use the `controllers` sub-namespace under the namespace of this module.
</span><span>102</span> <span>     * For example, if the namespace of this module is "foo\bar", then the default
</span><span>103</span> <span>     * controller namespace would be "foo\bar\controllers".
</span><span>104</span> <span>     * 如果没有设置,默认为当前模块的命名空间加上 `controllers`构成的命名空间
</span><span>105</span> <span>119  * 如当前模块的命名空间为"foo\bar",控制器的默认命名空间为"foo\bar\controllers"
</span><span>106</span> <span>     * See also the [guide section on autoloading](guide:concept-autoloading) to learn more about
</span><span>107</span> <span>     * defining namespaces and how classes are loaded.
</span><span>108</span>      <span>*/</span>
<span>109</span>     <span>public</span><span> $controllerNamespace;
</span><span>110</span>     <span>/*</span><span>*
</span><span>111</span> <span>     * @var string the default route of this module. Defaults to 'default'. 当前前模块的默认路由
</span><span>112</span> <span>     * The route may consist of child module ID, controller ID, and/or action ID.
</span><span>113</span> <span>     * For example, `help`, `post/create`, `admin/post/create`.
</span><span>114</span> <span>     * If action ID is not given, it will take the default value as specified in
</span><span>115</span> <span>     * [[Controller::defaultAction]].
</span><span>116</span> <span>     * route 可能包含子模块ID,控制器ID,操作ID,如果action ID未给定,会调用[Controller::defaultAction]指定的action
</span><span>117</span>      <span>*/</span>
<span>118</span>     <span>public</span> $defaultRoute = <span>'</span><span>default</span><span>'</span><span>;
</span><span>119</span> 
<span>120</span>     <span>/*</span><span>*
</span><span>121</span> <span>     * @var string the root directory of the module.    当前模块的根路径
</span><span>122</span>      <span>*/</span>
<span>123</span>     <span>private</span><span> $_basePath;
</span><span>124</span>     <span>/*</span><span>*
</span><span>125</span> <span>     * @var string the root directory that contains view files for this module 当前模块下视图文件的路径
</span><span>126</span>      <span>*/</span>
<span>127</span>     <span>private</span><span> $_viewPath;
</span><span>128</span>     <span>/*</span><span>*
</span><span>129</span> <span>     * @var string the root directory that contains layout view files for this module.
</span><span>130</span> <span>     * 当前模块下的布局文件路径
</span><span>131</span>      <span>*/</span>
<span>132</span>     <span>private</span><span> $_layoutPath;
</span><span>133</span>     <span>/*</span><span>*
</span><span>134</span> <span>     * @var array child modules of this module  当前模块的子模块数组
</span><span>135</span>      <span>*/</span>
<span>136</span>     <span>private</span> $_modules =<span> [];
</span><span>137</span> 
<span>138</span> 
<span>139</span>     <span>/*</span><span>*
</span><span>140</span> <span>     * Constructor. 构造函数
</span><span>141</span> <span>     * @param string $id the ID of this module 当前模块的标识
</span><span>142</span> <span>     * @param Module $parent the parent module (if any) 当前模块的父模块
</span><span>143</span> <span>     * @param array $config name-value pairs that will be used to initialize the object properties
</span><span>144</span> <span>     * 配置文件 用于初始化对象属性
</span><span>145</span>      <span>*/</span>
<span>146</span>     <span>public</span> function __construct($id, $parent = <span>null</span>, $config =<span> [])
</span><span>147</span> <span>    {
</span><span>148</span>         $<span>this</span>->id = $id; <span>//</span><span>给当前模块唯一标识</span>
<span>149</span>         $<span>this</span>->module = $parent;    <span>//</span><span>当前模块的父模块</span>
<span>150</span>         parent::__construct($config);   <span>//</span><span>调用父类的配置</span>
<span>151</span> <span>    }
</span><span>152</span> 
<span>153</span>     <span>/*</span><span>*
</span><span>154</span> <span>     * Returns the currently requested instance of this module class.   取得当前类的实例
</span><span>155</span> <span>     * If the module class is not currently requested, null will be returned.
</span><span>156</span> <span>     * 没有当前请求的模块类,将返回null。
</span><span>157</span> <span>     * This method is provided so that you access the module instance from anywhere within the module.
</span><span>158</span> <span>     * 可以在模块内的任何地方访问类的实例
</span><span>159</span> <span>     * @return static|null the currently requested instance of this module class, or null if the module class is not requested.
</span><span>160</span>      <span>*/</span>
<span>161</span>     <span>public</span> <span>static</span><span> function getInstance()
</span><span>162</span> <span>    {
</span><span>163</span>         $<span>class</span> =<span> get_called_class();
</span><span>164</span>         <span>return</span> isset(Yii::$app->loadedModules[$<span>class</span>]) ? Yii::$app->loadedModules[$<span>class</span>] : <span>null</span><span>;
</span><span>165</span> <span>    }
</span><span>166</span> 
<span>167</span>     <span>/*</span><span>*
</span><span>168</span> <span>     * Sets the currently requested instance of this module class.  设置模块类的当前请求实例。
</span><span>169</span> <span>     * @param Module|null $instance the currently requested instance of this module class.
</span><span>170</span> <span>     * If it is null, the instance of the calling class will be removed, if any.
</span><span>171</span> <span>     * 当前模块类的实例。如果为null,调用类的实例将被删除
</span><span>172</span>      <span>*/</span>
<span>173</span>     <span>public</span> <span>static</span><span> function setInstance($instance)
</span><span>174</span> <span>    {
</span><span>175</span>         <span>if</span> ($instance === <span>null</span>) {<span>//</span><span>如果没有传入参数,直接unset</span>
<span>176</span>             unset(Yii::$app-><span>loadedModules[get_called_class()]);
</span><span>177</span>         } <span>else</span> {<span>//</span><span>将该类和类的实例存入loadedModules数组中</span>
<span>178</span>             Yii::$app->loadedModules[get_class($instance)] =<span> $instance;
</span><span>179</span> <span>        }
</span><span>180</span> <span>    }
</span><span>181</span> 
<span>182</span>     <span>/*</span><span>*
</span><span>183</span> <span>     * Initializes the module.
</span><span>184</span> <span>     * 初始化模块
</span><span>185</span> <span>     * This method is called after the module is created and initialized with property values
</span><span>186</span> <span>     * given in configuration. The default implementation will initialize [[controllerNamespace]]
</span><span>187</span> <span>     * if it is not set.
</span><span>188</span> <span>     * 该模块创建和初始化给出的配置  如果没有设置,默认初始化[[controllerNamespace]]
</span><span>189</span> <span>     * If you override this method, please make sure you call the parent implementation.
</span><span>190</span> <span>     * 重写确保父类调用
</span><span>191</span>      <span>*/</span>
<span>192</span>     <span>public</span><span> function init()
</span><span>193</span> <span>    {
</span><span>194</span>         <span>if</span> ($<span>this</span>->controllerNamespace === <span>null</span>) {<span>//</span><span>判断是否为空</span>
<span>195</span>             $<span>class</span> = get_class($<span>this</span>); <span>//</span><span>获取类名</span>
<span>196</span>             <span>if</span> (($pos = strrpos($<span>class</span>, <span>'</span><span>\\</span><span>'</span>)) !== <span>false</span><span>) {
</span><span>197</span>                 $<span>this</span>->controllerNamespace = substr($<span>class</span>, <span>0</span>, $pos) . <span>'</span><span>\\controllers</span><span>'</span>; <span>//</span><span>取得命名空间</span>
<span>198</span> <span>            }
</span><span>199</span> <span>        }
</span><span>200</span> <span>    }
</span><span>201</span> 
<span>202</span>     <span>/*</span><span>*
</span><span>203</span> <span>     * Returns an ID that uniquely identifies this module among all modules within the current application.
</span><span>204</span> <span>     * Note that if the module is an application, an empty string will be returned.
</span><span>205</span> <span>     * 当前应用程序中模块的唯一标识,如果该模块是应用程序返回空字符串
</span><span>206</span> <span>     * @return string the unique ID of the module.模块的唯一标识
</span><span>207</span>      <span>*/</span>
<span>208</span>     <span>public</span><span> function getUniqueId()
</span><span>209</span>     {     <span>//</span><span>如果当前模块有父模块,则返回拼接的标识作为唯一ID,否则只返回当前模块ID</span>
<span>210</span>         <span>return</span> $<span>this</span>->module ? ltrim($<span>this</span>->module->getUniqueId() . <span>'</span><span>/</span><span>'</span> . $<span>this</span>->id, <span>'</span><span>/</span><span>'</span>) : $<span>this</span>-><span>id;
</span><span>211</span> <span>    }
</span><span>212</span> 
<span>213</span>     <span>/*</span><span>*
</span><span>214</span> <span>     * Returns the root directory of the module.    返回当前模块的根路径
</span><span>215</span> <span>     * It defaults to the directory containing the module class file.   默认为包含模块类文件的路径。
</span><span>216</span> <span>     * @return string the root directory of the module. 当前模块的根路径
</span><span>217</span>      <span>*/</span>
<span>218</span>     <span>public</span><span> function getBasePath()
</span><span>219</span> <span>    {
</span><span>220</span>         <span>if</span> ($<span>this</span>->_basePath === <span>null</span><span>) {
</span><span>221</span>             $<span>class</span> = <span>new</span> \ReflectionClass($<span>this</span>);   <span>//</span><span>生成当前类的反射对象</span>
<span>222</span>             $<span>this</span>->_basePath = dirname($<span>class</span>->getFileName());<span>//</span><span>取得类定义的路径</span>
<span>223</span> <span>        }
</span><span>224</span> 
<span>225</span>         <span>return</span> $<span>this</span>-><span>_basePath;
</span><span>226</span> <span>    }
</span><span>227</span> 
<span>228</span>     <span>/*</span><span>*
</span><span>229</span> <span>     * Sets the root directory of the module.   设置当前模块的根路径
</span><span>230</span> <span>     * This method can only be invoked at the beginning of the constructor. 只在构造函数开始时调用。
</span><span>231</span> <span>     * @param string $path the root directory of the module. This can be either a directory name or a path alias.
</span><span>232</span> <span>     * 模块的根目录。可以是一个目录名或路径别名
</span><span>233</span> <span>     * @throws InvalidParamException if the directory does not exist. 如果路径不存在。抛出异常
</span><span>234</span>      <span>*/</span>
<span>235</span>     <span>public</span><span> function setBasePath($path)
</span><span>236</span> <span>    {
</span><span>237</span>         $path = Yii::getAlias($path);<span>//</span><span>将路径别名转换为实际路径。</span>
<span>238</span>         $p = realpath($path);   <span>//</span><span>返回绝对路径名</span>
<span>239</span>         <span>if</span> ($p !== <span>false</span> &&<span> is_dir($p)) {
</span><span>240</span>             $<span>this</span>->_basePath = $p;<span>//</span><span>是目录名且不为false,返回目录名,否则抛出异常</span>
<span>241</span>         } <span>else</span><span> {
</span><span>242</span>             <span>throw</span> <span>new</span> InvalidParamException(<span>"</span><span>The directory does not exist: $path</span><span>"</span><span>);
</span><span>243</span> <span>        }
</span><span>244</span>     }
Copy after login

 

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to delete Xiaohongshu notes How to delete Xiaohongshu notes Mar 21, 2024 pm 08:12 PM

How to delete Xiaohongshu notes? Notes can be edited in the Xiaohongshu APP. Most users don’t know how to delete Xiaohongshu notes. Next, the editor brings users pictures and texts on how to delete Xiaohongshu notes. Tutorial, interested users come and take a look! Xiaohongshu usage tutorial How to delete Xiaohongshu notes 1. First open the Xiaohongshu APP and enter the main page, select [Me] in the lower right corner to enter the special area; 2. Then in the My area, click on the note page shown in the picture below , select the note you want to delete; 3. Enter the note page, click [three dots] in the upper right corner; 4. Finally, the function bar will expand at the bottom, click [Delete] to complete.

The role and practical application of arrow symbols in PHP The role and practical application of arrow symbols in PHP Mar 22, 2024 am 11:30 AM

The role and practical application of arrow symbols in PHP In PHP, the arrow symbol (-&gt;) is usually used to access the properties and methods of objects. Objects are one of the basic concepts of object-oriented programming (OOP) in PHP. In actual development, arrow symbols play an important role in operating objects. This article will introduce the role and practical application of arrow symbols, and provide specific code examples to help readers better understand. 1. The role of the arrow symbol to access the properties of an object. The arrow symbol can be used to access the properties of an object. When we instantiate a pair

What should I do if the notes I posted on Xiaohongshu are missing? What's the reason why the notes it just sent can't be found? What should I do if the notes I posted on Xiaohongshu are missing? What's the reason why the notes it just sent can't be found? Mar 21, 2024 pm 09:30 PM

As a Xiaohongshu user, we have all encountered the situation where published notes suddenly disappeared, which is undoubtedly confusing and worrying. In this case, what should we do? This article will focus on the topic of &quot;What to do if the notes published by Xiaohongshu are missing&quot; and give you a detailed answer. 1. What should I do if the notes published by Xiaohongshu are missing? First, don't panic. If you find that your notes are missing, staying calm is key and don't panic. This may be caused by platform system failure or operational errors. Checking release records is easy. Just open the Xiaohongshu App and click &quot;Me&quot; → &quot;Publish&quot; → &quot;All Publications&quot; to view your own publishing records. Here you can easily find previously published notes. 3.Repost. If found

How to Undo Delete from Home Screen in iPhone How to Undo Delete from Home Screen in iPhone Apr 17, 2024 pm 07:37 PM

Deleted something important from your home screen and trying to get it back? You can put app icons back on the screen in a variety of ways. We have discussed all the methods you can follow and put the app icon back on the home screen. How to Undo Remove from Home Screen in iPhone As we mentioned before, there are several ways to restore this change on iPhone. Method 1 – Replace App Icon in App Library You can place an app icon on your home screen directly from the App Library. Step 1 – Swipe sideways to find all apps in the app library. Step 2 – Find the app icon you deleted earlier. Step 3 – Simply drag the app icon from the main library to the correct location on the home screen. This is the application diagram

From beginner to proficient: Explore various application scenarios of Linux tee command From beginner to proficient: Explore various application scenarios of Linux tee command Mar 20, 2024 am 10:00 AM

The Linuxtee command is a very useful command line tool that can write output to a file or send output to another command without affecting existing output. In this article, we will explore in depth the various application scenarios of the Linuxtee command, from entry to proficiency. 1. Basic usage First, let’s take a look at the basic usage of the tee command. The syntax of tee command is as follows: tee[OPTION]...[FILE]...This command will read data from standard input and save the data to

Let's learn how to input the root number in Word together Let's learn how to input the root number in Word together Mar 19, 2024 pm 08:52 PM

When editing text content in Word, you sometimes need to enter formula symbols. Some guys don’t know how to input the root number in Word, so Xiaomian asked me to share with my friends a tutorial on how to input the root number in Word. Hope it helps my friends. First, open the Word software on your computer, then open the file you want to edit, and move the cursor to the location where you need to insert the root sign, refer to the picture example below. 2. Select [Insert], and then select [Formula] in the symbol. As shown in the red circle in the picture below: 3. Then select [Insert New Formula] below. As shown in the red circle in the picture below: 4. Select [Radical Formula], and then select the appropriate root sign. As shown in the red circle in the picture below:

How to publish notes tutorial on Xiaohongshu? Can it block people by posting notes? How to publish notes tutorial on Xiaohongshu? Can it block people by posting notes? Mar 25, 2024 pm 03:20 PM

As a lifestyle sharing platform, Xiaohongshu covers notes in various fields such as food, travel, and beauty. Many users want to share their notes on Xiaohongshu but don’t know how to do it. In this article, we will detail the process of posting notes on Xiaohongshu and explore how to block specific users on the platform. 1. How to publish notes tutorial on Xiaohongshu? 1. Register and log in: First, you need to download the Xiaohongshu APP on your mobile phone and complete the registration and login. It is very important to complete your personal information in the personal center. By uploading your avatar, filling in your nickname and personal introduction, you can make it easier for other users to understand your information, and also help them pay better attention to your notes. 3. Select the publishing channel: At the bottom of the homepage, click the &quot;Send Notes&quot; button and select the channel you want to publish.

Go Get: Get and manage Go modules Go Get: Get and manage Go modules Apr 08, 2024 am 10:06 AM

Clear answer: GoGet is a command line tool for managing Go modules and their dependencies. Detailed description: GoGet can be used to obtain Go modules, the syntax is: goget[-u]. A specific module version can be specified: goget@. Use goget -u to update installed modules. Remove modules no longer in use via gomodtidy.

See all articles