: PHP syntax issue I'm reading a Sentry tutorial for implementing an authentication workflow in a webapp. I'm a PHP beginner. There's a thing I don't understand in this code: <?php // set up
I'm reading a Sentry tutorial for implementing an authentication workflow in a webapp. I'm a PHP beginner. There's a thing I don't understand in this code:
<?php
// set up autoloader
require ('vendorautoload.php');
// configure database
$dsn = 'mysql:dbname=appdata;host=localhost';
$u = 'sentry';
$p = 'g39ejdl';
CartalystSentryFacadesNativeSentry::setupDatabaseResolver(
new PDO($dsn, $u, $p));
[...]
What is the meaning of CartalystSentryFacadesNativeSentry? What's happening there? Is it a server file path? While debugging I found that this line doesn't execute.
More posts by @Yeniel560
1 Comments
Sorted by latest first Latest Oldest Best
You have a case of PHP syntax for namespaces, this has nothing to do with path and filenames on disk.
See this introduction: php.net/manual/en/language.namespaces.basics.php (even if it compares PHP namespaces to concept of disk directories and files, it is an analogy, not a 1-1 mapping)
It sure should execute.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.