src/Extension/Extension.php
/**
	 * Returns the instance of the extension's main class, if it has one. Otherwise, null.
	 *
	 * @return object|null
	 */
Returns the instance of the extension's main class, if it has one. Otherwise, null.
@return object|null
Returns the instance of the extension ' s main class if it has one . Otherwise null . @return object|null
public function instance() {
		if (is_null($this->instance)) {
			$className = $this->getMainClassName();
			if (!is_null($className)) {
				if (class_exists($className)) {
					$this->instance = new $className($this);
				}
			}
		}
		return $this->instance;
	}
public function instance ( ) { if ( is_null ( $ this -> instance ) ) { $ className = $ this -> getMainClassName ( ) ; if ( ! is_null ( $ className ) ) { if ( class_exists ( $ className ) ) { $ this -> instance = new $ className ( $ this ) ; } } } return $ this -> instance ; }
Returns the instance of the extension's main class, if it has one.
Returns the instance of the extension ' s main class if it has one .