[TYPO3-50-general] Common namings for variables with path-content

Malte Jansen mail at maltejansen.de
Mon Jan 12 12:06:07 CET 2009


Hi Robert,

Robert Lemke schrieb:
> Hi Malte,
> 
> Am 12.01.2009 um 10:21 schrieb Malte Jansen:
> 
>> So for the class-part, would suggest:
>>
>> namespace F3\MyPackage\;
>> class MyClass {}
>>
>> => "className" == MyClass
>> => "class" == F3\MyPackage\MyClass  (PHP: __CLASS__)
> 
> currently $class in FLOW3 means ReflectionClass($className), $method 
> means ReflectionMethod($methodName) etc.

I would suggest
$reflectionClass = Reflection_ReflectionClass($class)
like $objectFactory = Object_Factory($class)

We should stic closer to PHP...
$class == __CLASS__
$class == $namespace . $className (like $file == $path . $fileName)
$class == __NAMESPACE__ . $className


basically in FLOW3
we are useing $componentClassName for an object.

> Strictly speaking, __CLASS__ should be $fullQualifiedClassName - but 
> maybe we find a better name?


There is also a name missing for a part of the namespace. First I had in 
mind "component", but it's reserved for a subpackage.

e.g. $class = F3\MyPackage\SubPackage\MyClass
foreach (explode('\\', $class) AS ??????) {}
Any ideas?


Annotation:
Sticing closer to PHP I had in mind
with "directory" as "absolutePath", because of the function is_dir() and 
the  DirectoryIterator...

Cheers,

Malte


More information about the TYPO3-project-5_0-general mailing list