Gdn::controller PHP Method

controller() public static method

The current controller being targetted.
public static controller ( Gdn_Controller $Value = null ) : Gdn_Controller
$Value Gdn_Controller
return Gdn_Controller
    public static function controller($Value = null)
    {
        static $Controller = null;
        if ($Value !== null) {
            $Controller = $Value;
        }
        return $Controller;
    }

Usage Example

 /**
  * Get our cache.
  *
  * @return array|null
  */
 public function mediaCache()
 {
     if ($this->_MediaCache === null) {
         $this->cacheAttachedMedia(Gdn::controller());
     }
     return $this->_MediaCache;
 }
All Usage Examples Of Gdn::controller