Skip to content

Commit cb7ab8c

Browse files
Update README.md
1 parent b58e130 commit cb7ab8c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

README.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,13 @@ composer require javanile/php-global-var
1515

1616
function getNewEntity()
1717
{
18-
-global $entityManager;
19-
+$entityManager = get_global_var('entityManager');
18+
// Replace the following line
19+
global $entityManager;
20+
// With `get_global_var` call
21+
$entityManager = get_global_var('entityManager');
22+
23+
.
24+
.
25+
.
2026
}
2127
```

0 commit comments

Comments
 (0)