Merge "mw.Feedback: If the message is posted remotely, link the title correctly"
[lhc/web/wiklou.git] / includes / linker / LinkRendererFactory.php
index 7124be1..240ea09 100644 (file)
  * http://www.gnu.org/copyleft/gpl.html
  *
  * @file
- * @license GPL-2.0+
  * @author Kunal Mehta <legoktm@member.fsf.org>
  */
 namespace MediaWiki\Linker;
 
+use LinkCache;
 use TitleFormatter;
 use User;
 
@@ -35,18 +35,25 @@ class LinkRendererFactory {
         */
        private $titleFormatter;
 
+       /**
+        * @var LinkCache
+        */
+       private $linkCache;
+
        /**
         * @param TitleFormatter $titleFormatter
+        * @param LinkCache $linkCache
         */
-       public function __construct( TitleFormatter $titleFormatter ) {
+       public function __construct( TitleFormatter $titleFormatter, LinkCache $linkCache ) {
                $this->titleFormatter = $titleFormatter;
+               $this->linkCache = $linkCache;
        }
 
        /**
         * @return LinkRenderer
         */
        public function create() {
-               return new LinkRenderer( $this->titleFormatter );
+               return new LinkRenderer( $this->titleFormatter, $this->linkCache );
        }
 
        /**