Skip to content

Commit 69a64e5

Browse files
added diagram
1 parent 9369492 commit 69a64e5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/general-concept/namespaces/Finding class files with PSR4

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ title: Finding Class files with PSR4
44
---
55
Namespaces allow us to organise our PHP classes in a similar way that directories allow us to organise our files. In particular, the [PSR4 recommendation](https://www.php-fig.org/psr/psr-4/) which Joomla uses enables us to determine what file a certain class should be in.
66

7+
![Namespacing](_assets/namespace.jpg "PSR4 namespacing")
8+
79
To see this, let's take an example of the file administrator/components/com_content/src/View/Articles/HtmlView.php, which contains the code for the view which presents the Articles to the administrator. This file contains the lines
810
```php
911
namespace Joomla\Component\Content\Administrator\View\Articles;

0 commit comments

Comments
 (0)