tests
This commit is contained in:
parent
fbc588981b
commit
d68f9b232a
@ -123,11 +123,3 @@ class Item
|
|||||||
$this->mfauvorot = $row['mfauvorot'];
|
$this->mfauvorot = $row['mfauvorot'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ItemStats extends Item
|
|
||||||
{
|
|
||||||
public function printItemStats()
|
|
||||||
{
|
|
||||||
echo $this->name ." (Масса: ". $this->massa .")<br>";
|
|
||||||
}
|
|
||||||
}
|
|
15
classes/ItemClass.php
Normal file
15
classes/ItemClass.php
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Created by PhpStorm.
|
||||||
|
* User: Lopar
|
||||||
|
* Date: 11.01.2019
|
||||||
|
* Time: 18:21
|
||||||
|
*/
|
||||||
|
|
||||||
|
class ItemClass extends Item
|
||||||
|
{
|
||||||
|
public function printItemStats()
|
||||||
|
{
|
||||||
|
echo $this->name ." (Масса: ". $this->massa .")<br>";
|
||||||
|
}
|
||||||
|
}
|
2
test.php
2
test.php
@ -17,7 +17,7 @@ require_once 'config.php';
|
|||||||
$result = db::c()->query('SELECT * FROM `shop` WHERE count > 0');
|
$result = db::c()->query('SELECT * FROM `shop` WHERE count > 0');
|
||||||
|
|
||||||
while ($row = $result->fetch_assoc()) {
|
while ($row = $result->fetch_assoc()) {
|
||||||
$iteminfo[] = new ItemStats($row);
|
$iteminfo[] = new Item($row);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($iteminfo as $iinfo) {
|
foreach ($iteminfo as $iinfo) {
|
||||||
|
Loading…
Reference in New Issue
Block a user