@@ -23,30 +23,30 @@ for autoloader interoperability, by mapping namespaces to file system paths.
23
23
separator.
24
24
25
25
- ** Namespace Name** : Given a "fully qualified class name" of
26
- ` Foo\Bar\Baz\Qux ` , the "namespace names" are ` Foo ` , ` Bar ` , and ` Baz ` . A
26
+ ` Acme\Log\Formatter\LineFormatter ` , the "namespace names" are ` Acme ` , ` Log ` , and ` Formatter ` . A
27
27
namespace name MUST NOT include a leading or trailing namespace separator.
28
28
29
29
- ** Namespace Prefix** : Given a "fully qualified class name" of
30
- ` Foo\Bar\Baz\Qux ` , the "namespace prefix" could be ` Foo \` , ` Foo\Bar \` , or
31
- ` Foo\Bar\Baz \` . The "namespace prefix" MUST NOT include a leading namespace
30
+ ` Acme\Log\Formatter\LineFormatter ` , the "namespace prefix" could be ` Acme \` , ` Acme\Log \` , or
31
+ ` Acme\Log\Formatter \` . The "namespace prefix" MUST NOT include a leading namespace
32
32
separator, but MUST include a trailing namespace separator.
33
33
34
34
- ** Relative Class Name** : The parts of the "fully qualified class name" that
35
35
appear after the "namespace prefix". Given a "fully qualified class name" of
36
- ` Foo\Bar\Baz\Qux ` and a "namespace prefix" of ` Foo\Bar \` , the "relative
37
- class name" is ` Baz\Qux ` . The "relative class name" MUST NOT include a
36
+ ` Acme\Log\Formatter\LineFormatter ` and a "namespace prefix" of ` Acme\Log \` , the "relative
37
+ class name" is ` Formatter\LineFormatter ` . The "relative class name" MUST NOT include a
38
38
leading namespace separator.
39
39
40
40
- ** Base Directory** : The directory path in the file system where the files
41
41
for "relative class names" have their root. Given a namespace prefix of
42
- ` Foo\Bar \` , the "base directory" could be ` ./src/ ` .
42
+ ` Acme\Log \` , the "base directory" could be ` ./src/ ` .
43
43
The "base directory" MUST include a trailing directory separator.
44
44
45
45
- ** Mapped File Name** : The path in the file system resulting from the
46
46
transformation of a "fully qualified class name". Given a "fully qualified
47
- class name" of ` Foo\Bar\Baz\Qux ` , a namespace prefix of ` Foo\Bar \` , and a
47
+ class name" of ` Acme\Log\Formatter\LineFormatter ` , a namespace prefix of ` Acme\Log \` , and a
48
48
"base directory" of ` ./src/ ` , the "mapped file name"
49
- MUST be ` ./src/Baz/Qux .php ` .
49
+ MUST be ` ./src/Formatter/LineFormatter .php ` .
50
50
51
51
52
52
3 . Specification
@@ -68,17 +68,17 @@ for autoloader interoperability, by mapping namespaces to file system paths.
68
68
MAY be followed by one or more additional namespace names, and MUST end in
69
69
a class name.
70
70
71
- > ** Example:** With a "fully qualified class name" of ` Foo\Bar \Baz` ,
72
- > the "namespace name is ` Foo\Bar ` and the class name is ` Baz ` .
71
+ > ** Example:** With a "fully qualified class name" of ` Acme\Log \Baz` ,
72
+ > the "namespace name is ` Acme\Log ` and the class name is ` Baz ` .
73
73
74
74
6 . A "namespace prefix" MUST correspond to at least one "base directory".
75
75
76
76
> ** Example:** Any one of these examples would be valid if used
77
77
> individually:
78
78
>
79
- > * \Foo\Bar -> ./
80
- > * \Foo\Bar -> ./src/
81
- > * \Foo\Bar -> ./src/bar /
79
+ > * \Acme\Log -> ./
80
+ > * \Acme\Log -> ./src/
81
+ > * \Acme\Log -> ./src/foo /
82
82
83
83
7 . A "namespace prefix" MAY correspond to more than one "base directory". The
84
84
order in which an autoloader will attempt to map the file is not in the scope
0 commit comments