src/MvcCore/Ext/Debugs/Tracys/RoutingPanel.php
protected function completeCtrlActionLink ($ctrlName = '', $actionName = '') {
		$fullControllerClassName = '';
		static $controllersDir = NULL;
		if ($controllersDir === NULL) {
			$controllersDir = '\\' . implode('\\', [$this->app->GetAppDir(), $this->app->GetControllersDir()]) . '\\';
		}
		if (substr($ctrlName, 0, 2) == '//') {
			$fullControllerClassName = $ctrlName;
			$fullClassToSearch = substr($ctrlName, 2);
		} else {
			$fullControllerClassName = $controllersDir . $ctrlName;
			$fullClassToSearch = $fullControllerClassName;
		}
		$result = ['', $fullControllerClassName . ':' . $actionName . 'Action'];
		try {
			$ctrlReflection = new \ReflectionClass($fullClassToSearch);
			if ($ctrlReflection instanceof \ReflectionClass) {
				$file = $ctrlReflection->getFileName();
				$actionReflection = $ctrlReflection->getMethod($actionName . 'Action');
				if ($actionReflection instanceof \ReflectionMethod) {
					$line = $actionReflection->getStartLine();
					$result = [
						\Tracy\Helpers::editorUri($file, $line),
						$fullControllerClassName . ':' . $actionName . 'Action'
					];
				}
			}
		} catch (\Exception $e) {
		}
		return $result;
	}
protected function completeCtrlActionLink ($ctrlName = '', $actionName = '') {
		$fullControllerClassName = '';
		static $controllersDir = NULL;
		if ($controllersDir === NULL) {
			$controllersDir = '\\' . implode('\\', [$this->app->GetAppDir(), $this->app->GetControllersDir()]) . '\\';
		}
		if (substr($ctrlName, 0, 2) == '//') {
			$fullControllerClassName = $ctrlName;
			$fullClassToSearch = substr($ctrlName, 2);
		} else {
			$fullControllerClassName = $controllersDir . $ctrlName;
			$fullClassToSearch = $fullControllerClassName;
		}
		$result = ['', $fullControllerClassName . ':' . $actionName . 'Action'];
		try {
			$ctrlReflection = new \ReflectionClass($fullClassToSearch);
			if ($ctrlReflection instanceof \ReflectionClass) {
				$file = $ctrlReflection->getFileName();
				$actionReflection = $ctrlReflection->getMethod($actionName . 'Action');
				if ($actionReflection instanceof \ReflectionMethod) {
					$line = $actionReflection->getStartLine();
					$result = [
						\Tracy\Helpers::editorUri($file, $line),
						$fullControllerClassName . ':' . $actionName . 'Action'
					];
				}
			}
		} catch (\Exception $e) {
		}
		return $result;
	}
protected function completeCtrlActionLink ( $ ctrlName = '' , $ actionName = '' ) { $ fullControllerClassName = '' ; static $ controllersDir = NULL ; if ( $ controllersDir === NULL ) { $ controllersDir = '\\' . implode ( '\\' , [ $ this -> app -> GetAppDir ( ) , $ this -> app -> GetControllersDir ( ) ] ) . '\\' ; } if ( substr ( $ ctrlName , 0 , 2 ) == '//' ) { $ fullControllerClassName = $ ctrlName ; $ fullClassToSearch = substr ( $ ctrlName , 2 ) ; } else { $ fullControllerClassName = $ controllersDir . $ ctrlName ; $ fullClassToSearch = $ fullControllerClassName ; } $ result = [ '' , $ fullControllerClassName . ':' . $ actionName . 'Action' ] ; try { $ ctrlReflection = new \ ReflectionClass ( $ fullClassToSearch ) ; if ( $ ctrlReflection instanceof \ ReflectionClass ) { $ file = $ ctrlReflection -> getFileName ( ) ; $ actionReflection = $ ctrlReflection -> getMethod ( $ actionName . 'Action' ) ; if ( $ actionReflection instanceof \ ReflectionMethod ) { $ line = $ actionReflection -> getStartLine ( ) ; $ result = [ \ Tracy \ Helpers :: editorUri ( $ file , $ line ) , $ fullControllerClassName . ':' . $ actionName . 'Action' ] ; } } } catch ( \ Exception $ e ) { } return $ result ; }
Try to complete editor link by controller class name and it's action
by PHP reflection object if controller class exist and it's possible by
loaded controller class to create reflection object to complete link properties.
Result is returned as array containing:
0 - editor link URL
1 - link text
@param string $ctrlName
@param string $actionName
@return array
Try to complete editor link by controller class name and it s action by PHP reflection object if controller class exist and it s possible by loaded controller class to create reflection object to complete link properties . Result is returned as array containing : 0 - editor link URL 1 - link text