[TYPO3-core] Creating aliases with the "use" operator

Steffen Müller typo3 at t3node.com
Fri Oct 12 22:14:12 CEST 2012


Hi,

thanks for your reply.

Am 12.10.2012 21:55, schrieb Jigal van Hemert:
> 
> AFAIK you can use unqualified names if you are inside the namespace.
> 
> If inside namespace TYPO3\CMS\Core\Log you have classes LogLevel and
> Logger you can simply use LogLevel::DEBUG . PHP will first try to
> resolve this qualified name (not fully qualified!) inside the current
> namespace and \TYPO3\CMS\Core\Log\LogLevel::DEBUG is exactly what you're
> looking for.
> 

There are other cases, where I have different namespaces:

TYPO3\CMS\Core\Log
TYPO3\CMS\Core\Log\Writer
TYPO3\CMS\Core\Log\Processor

All of them are part of the Logging API.

How to alias TYPO3\CMS\Core\Log\Writer\FileWriter within
TYPO3\CMS\Core\Log\Logger?

-- 
cheers,
Steffen

TYPO3 Blog: http://www.t3node.com/
Twitter: @t3node - http://twitter.com/t3node


More information about the TYPO3-team-core mailing list