You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi
I downloaded the repo and put it in my project folder. I wrote this php script and ran it:
<title></title>
include 'mtg-sdk-php-master/src/Databag.php';
include 'mtg-sdk-php-master/src/QueriesAll.php';
include 'mtg-sdk-php-master/src/QueriesWithConditions.php';
include 'mtg-sdk-php-master/src/QueriesOne.php';
include 'mtg-sdk-php-master/src/Changelog.php';
include 'mtg-sdk-php-master/src/QueriesAllAsArray.php';
include 'mtg-sdk-php-master/src/QueryBuilder.php';
include 'mtg-sdk-php-master/src/Set.php';
include 'mtg-sdk-php-master/src/Subtype.php';
include 'mtg-sdk-php-master/src/Supertype.php';
include 'mtg-sdk-php-master/src/Type.php';
include 'mtg-sdk-php-master/src/Card.php';
$cards = Card::where(['name' => 'Yarok, the Desecrated'])->all();
print_r($cards);
?>
</body>
I got this error:
Fatal error: Uncaught Error: Class "Card" not found in C:\xampp\htdocs\WebProgramming\FinalProject\apiTests.php:27 Stack trace: #0 {main} thrown in C:\xampp\htdocs\WebProgramming\FinalProject\apiTests.php on line 27
I don't know if this is relevant but near the top of the Card.php file: namespace mtgsdk;
is highlighted with the message:
PSR-4 Violation:
Namespace declaration name doesn't correspond to current directory structure
Please help me understand the problem. Why can't it find the Card class?
The text was updated successfully, but these errors were encountered:
Hi
<title></title>I downloaded the repo and put it in my project folder. I wrote this php script and ran it:
include 'mtg-sdk-php-master/src/Databag.php'; include 'mtg-sdk-php-master/src/QueriesAll.php'; include 'mtg-sdk-php-master/src/QueriesWithConditions.php'; include 'mtg-sdk-php-master/src/QueriesOne.php'; include 'mtg-sdk-php-master/src/Changelog.php'; include 'mtg-sdk-php-master/src/QueriesAllAsArray.php'; include 'mtg-sdk-php-master/src/QueryBuilder.php'; include 'mtg-sdk-php-master/src/Set.php'; include 'mtg-sdk-php-master/src/Subtype.php'; include 'mtg-sdk-php-master/src/Supertype.php'; include 'mtg-sdk-php-master/src/Type.php'; include 'mtg-sdk-php-master/src/Card.php'; $cards = Card::where(['name' => 'Yarok, the Desecrated'])->all(); print_r($cards); ?> </body>
I got this error:
Fatal error: Uncaught Error: Class "Card" not found in C:\xampp\htdocs\WebProgramming\FinalProject\apiTests.php:27 Stack trace: #0 {main} thrown in C:\xampp\htdocs\WebProgramming\FinalProject\apiTests.php on line 27
I don't know if this is relevant but near the top of the Card.php file:
namespace mtgsdk;
is highlighted with the message:
Please help me understand the problem. Why can't it find the Card class?
The text was updated successfully, but these errors were encountered: