mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-27 09:49:22 +02:00
PHP 8.1 compatibility
This commit is contained in:
parent
d691148c84
commit
0a3a079b86
@ -11,7 +11,7 @@
|
|||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
|
||||||
$configForumTablePrefix = config('forum_table_prefix');
|
$configForumTablePrefix = config('forum_table_prefix');
|
||||||
if(!empty(trim($configForumTablePrefix))) {
|
if(null !== $configForumTablePrefix && !empty(trim($configForumTablePrefix))) {
|
||||||
if(!in_array($configForumTablePrefix, array('myaac_', 'z_'))) {
|
if(!in_array($configForumTablePrefix, array('myaac_', 'z_'))) {
|
||||||
throw new RuntimeException('Invalid value for forum_table_prefix in config.php. Can be only: "myaac_" or "z_".');
|
throw new RuntimeException('Invalid value for forum_table_prefix in config.php. Can be only: "myaac_" or "z_".');
|
||||||
}
|
}
|
||||||
@ -322,4 +322,4 @@ class Forum
|
|||||||
return $hasAccess;
|
return $hasAccess;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -1019,6 +1019,7 @@ class OTS_Account extends OTS_Row_DAO implements IteratorAggregate, Countable
|
|||||||
* @throws PDOException On PDO operation error.
|
* @throws PDOException On PDO operation error.
|
||||||
* @return Iterator List of players.
|
* @return Iterator List of players.
|
||||||
*/
|
*/
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public function getIterator()
|
public function getIterator()
|
||||||
{
|
{
|
||||||
return $this->getPlayersList();
|
return $this->getPlayersList();
|
||||||
@ -1033,7 +1034,7 @@ class OTS_Account extends OTS_Row_DAO implements IteratorAggregate, Countable
|
|||||||
* @throws PDOException On PDO operation error.
|
* @throws PDOException On PDO operation error.
|
||||||
* @return int Count of players.
|
* @return int Count of players.
|
||||||
*/
|
*/
|
||||||
public function count()
|
public function count(): int
|
||||||
{
|
{
|
||||||
return $this->getPlayersList()->count();
|
return $this->getPlayersList()->count();
|
||||||
}
|
}
|
||||||
|
@ -190,6 +190,7 @@ abstract class OTS_Base_List implements IOTS_DAO, Iterator, Countable
|
|||||||
* @version 0.1.3
|
* @version 0.1.3
|
||||||
* @return OTS_Base_DAO Current row.
|
* @return OTS_Base_DAO Current row.
|
||||||
*/
|
*/
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public function current()
|
public function current()
|
||||||
{
|
{
|
||||||
$id = current($this->rows);
|
$id = current($this->rows);
|
||||||
@ -203,7 +204,7 @@ abstract class OTS_Base_List implements IOTS_DAO, Iterator, Countable
|
|||||||
*
|
*
|
||||||
* @throws PDOException On PDO operation error.
|
* @throws PDOException On PDO operation error.
|
||||||
*/
|
*/
|
||||||
public function rewind()
|
public function rewind(): void
|
||||||
{
|
{
|
||||||
$this->rows = $this->db->query( $this->getSQL() )->fetchAll();
|
$this->rows = $this->db->query( $this->getSQL() )->fetchAll();
|
||||||
}
|
}
|
||||||
@ -211,7 +212,7 @@ abstract class OTS_Base_List implements IOTS_DAO, Iterator, Countable
|
|||||||
/**
|
/**
|
||||||
* Moves to next row.
|
* Moves to next row.
|
||||||
*/
|
*/
|
||||||
public function next()
|
public function next(): void
|
||||||
{
|
{
|
||||||
next($this->rows);
|
next($this->rows);
|
||||||
}
|
}
|
||||||
@ -221,6 +222,7 @@ abstract class OTS_Base_List implements IOTS_DAO, Iterator, Countable
|
|||||||
*
|
*
|
||||||
* @return mixed Array key.
|
* @return mixed Array key.
|
||||||
*/
|
*/
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public function key()
|
public function key()
|
||||||
{
|
{
|
||||||
return key($this->rows);
|
return key($this->rows);
|
||||||
@ -231,7 +233,7 @@ abstract class OTS_Base_List implements IOTS_DAO, Iterator, Countable
|
|||||||
*
|
*
|
||||||
* @return bool Does next row exist.
|
* @return bool Does next row exist.
|
||||||
*/
|
*/
|
||||||
public function valid()
|
public function valid(): bool
|
||||||
{
|
{
|
||||||
return key($this->rows) !== null;
|
return key($this->rows) !== null;
|
||||||
}
|
}
|
||||||
@ -243,7 +245,7 @@ abstract class OTS_Base_List implements IOTS_DAO, Iterator, Countable
|
|||||||
* @return int Number of rows.
|
* @return int Number of rows.
|
||||||
* @throws PDOException On PDO operation error.
|
* @throws PDOException On PDO operation error.
|
||||||
*/
|
*/
|
||||||
public function count()
|
public function count(): int
|
||||||
{
|
{
|
||||||
return $this->db->query( $this->getSQL(true) )->fetchColumn();
|
return $this->db->query( $this->getSQL(true) )->fetchColumn();
|
||||||
}
|
}
|
||||||
|
@ -15,11 +15,11 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Container item representation.
|
* Container item representation.
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* This class represents items that can contain other items. It's {@link OTS_Container::count() count() method} has been overwritten so it now doesn't return count of current item (if it would even be possible for containers) but amount of items within (not recursively).
|
* This class represents items that can contain other items. It's {@link OTS_Container::count() count() method} has been overwritten so it now doesn't return count of current item (if it would even be possible for containers) but amount of items within (not recursively).
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @package POT
|
* @package POT
|
||||||
* @version 0.1.3
|
* @version 0.1.3
|
||||||
*/
|
*/
|
||||||
@ -27,14 +27,14 @@ class OTS_Container extends OTS_Item implements IteratorAggregate
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Contained items.
|
* Contained items.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
private $items = array();
|
private $items = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds item to container.
|
* Adds item to container.
|
||||||
*
|
*
|
||||||
* @param OTS_Item $item Item.
|
* @param OTS_Item $item Item.
|
||||||
*/
|
*/
|
||||||
public function addItem(OTS_Item $item)
|
public function addItem(OTS_Item $item)
|
||||||
@ -44,11 +44,11 @@ class OTS_Container extends OTS_Item implements IteratorAggregate
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes given item from current container.
|
* Removes given item from current container.
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* Passed item must be exacly instance of item which is stored in container, not it's copy. This method bases on PHP references.
|
* Passed item must be exacly instance of item which is stored in container, not it's copy. This method bases on PHP references.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @param OTS_Item $item Item.
|
* @param OTS_Item $item Item.
|
||||||
* @tutorial POT/Players.pkg#deleting
|
* @tutorial POT/Players.pkg#deleting
|
||||||
*/
|
*/
|
||||||
@ -66,14 +66,14 @@ class OTS_Container extends OTS_Item implements IteratorAggregate
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Number of items inside container.
|
* Number of items inside container.
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* OTS_Container implementation of Countable interface differs from {@link OTS_Item OTS_Item} implemention. {@link OTS_Item::count() OTS_Item::count()} returns count of given item, OTS_Container::count() returns number of items inside container. If somehow it would be possible to make container items with more then 1 in one place, you can use {@link OTS_Item::getCount() OTS_Item::getCount()} and {@link OTS_Item::setCount() OTS_Item::setCount()} in code where you are not sure if working with regular item, or container.
|
* OTS_Container implementation of Countable interface differs from {@link OTS_Item OTS_Item} implemention. {@link OTS_Item::count() OTS_Item::count()} returns count of given item, OTS_Container::count() returns number of items inside container. If somehow it would be possible to make container items with more then 1 in one place, you can use {@link OTS_Item::getCount() OTS_Item::getCount()} and {@link OTS_Item::setCount() OTS_Item::setCount()} in code where you are not sure if working with regular item, or container.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @return int Number of items.
|
* @return int Number of items.
|
||||||
*/
|
*/
|
||||||
public function count()
|
public function count(): int
|
||||||
{
|
{
|
||||||
return count($items);
|
return count($items);
|
||||||
}
|
}
|
||||||
@ -123,7 +123,7 @@ class OTS_Container extends OTS_Item implements IteratorAggregate
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns iterator handle for loops.
|
* Returns iterator handle for loops.
|
||||||
*
|
*
|
||||||
* @version 0.1.0
|
* @version 0.1.0
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
* @return ArrayIterator Items iterator.
|
* @return ArrayIterator Items iterator.
|
||||||
@ -135,7 +135,7 @@ class OTS_Container extends OTS_Item implements IteratorAggregate
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Clones all contained items.
|
* Clones all contained items.
|
||||||
*
|
*
|
||||||
* @version 0.1.3
|
* @version 0.1.3
|
||||||
* @since 0.1.3
|
* @since 0.1.3
|
||||||
*/
|
*/
|
||||||
|
@ -538,6 +538,7 @@ class OTS_Group extends OTS_Row_DAO implements IteratorAggregate, Countable
|
|||||||
* @throws PDOException On PDO operation error.
|
* @throws PDOException On PDO operation error.
|
||||||
* @return Iterator List of players.
|
* @return Iterator List of players.
|
||||||
*/
|
*/
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public function getIterator()
|
public function getIterator()
|
||||||
{
|
{
|
||||||
return $this->getPlayersList();
|
return $this->getPlayersList();
|
||||||
@ -552,7 +553,7 @@ class OTS_Group extends OTS_Row_DAO implements IteratorAggregate, Countable
|
|||||||
* @throws PDOException On PDO operation error.
|
* @throws PDOException On PDO operation error.
|
||||||
* @return int Count of players.
|
* @return int Count of players.
|
||||||
*/
|
*/
|
||||||
public function count()
|
public function count(): int
|
||||||
{
|
{
|
||||||
return $this->getPlayersList()->count();
|
return $this->getPlayersList()->count();
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ class OTS_Groups_List implements IteratorAggregate, Countable
|
|||||||
$info['access'] = $group['name'];
|
$info['access'] = $group['name'];
|
||||||
$this->groups[$group['id']] = new OTS_Group($info);
|
$this->groups[$group['id']] = new OTS_Group($info);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ class OTS_Groups_List implements IteratorAggregate, Countable
|
|||||||
global $config;
|
global $config;
|
||||||
$file = $config['data_path'] . 'XML/groups.xml';
|
$file = $config['data_path'] . 'XML/groups.xml';
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!@file_exists($file)) {
|
if(!@file_exists($file)) {
|
||||||
error('Error: Cannot load groups.xml. More info in system/logs/error.log file.');
|
error('Error: Cannot load groups.xml. More info in system/logs/error.log file.');
|
||||||
log_append('error.log', '[OTS_Groups_List.php] Fatal error: Cannot load groups.xml (' . $file . '). It doesnt exist.');
|
log_append('error.log', '[OTS_Groups_List.php] Fatal error: Cannot load groups.xml (' . $file . '). It doesnt exist.');
|
||||||
@ -99,7 +99,7 @@ class OTS_Groups_List implements IteratorAggregate, Countable
|
|||||||
log_append('error.log', '[OTS_Groups_List.php] Fatal error: Cannot load groups.xml (' . $file . '). Error: ' . print_r(error_get_last(), true));
|
log_append('error.log', '[OTS_Groups_List.php] Fatal error: Cannot load groups.xml (' . $file . '). Error: ' . print_r(error_get_last(), true));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// loads groups
|
// loads groups
|
||||||
foreach($groups->getElementsByTagName('group') as $group)
|
foreach($groups->getElementsByTagName('group') as $group)
|
||||||
{
|
{
|
||||||
@ -157,7 +157,7 @@ class OTS_Groups_List implements IteratorAggregate, Countable
|
|||||||
if($id > $group_id)
|
if($id > $group_id)
|
||||||
$group_id = $id;
|
$group_id = $id;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $group_id;
|
return $group_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -196,6 +196,7 @@ class OTS_Groups_List implements IteratorAggregate, Countable
|
|||||||
* @since 0.1.5
|
* @since 0.1.5
|
||||||
* @return AppendIterator Iterator for all groups.
|
* @return AppendIterator Iterator for all groups.
|
||||||
*/
|
*/
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public function getIterator()
|
public function getIterator()
|
||||||
{
|
{
|
||||||
$iterator = new AppendIterator();
|
$iterator = new AppendIterator();
|
||||||
@ -210,7 +211,7 @@ class OTS_Groups_List implements IteratorAggregate, Countable
|
|||||||
* @since 0.1.5
|
* @since 0.1.5
|
||||||
* @return int Amount of all groups.
|
* @return int Amount of all groups.
|
||||||
*/
|
*/
|
||||||
public function count()
|
public function count(): int
|
||||||
{
|
{
|
||||||
return count($this->groups);
|
return count($this->groups);
|
||||||
}
|
}
|
||||||
|
@ -709,6 +709,7 @@ class OTS_Guild extends OTS_Row_DAO implements IteratorAggregate, Countable
|
|||||||
* @throws PDOException On PDO operation error.
|
* @throws PDOException On PDO operation error.
|
||||||
* @return Iterator List of ranks.
|
* @return Iterator List of ranks.
|
||||||
*/
|
*/
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public function getIterator()
|
public function getIterator()
|
||||||
{
|
{
|
||||||
return $this->getGuildRanksList();
|
return $this->getGuildRanksList();
|
||||||
@ -723,7 +724,7 @@ class OTS_Guild extends OTS_Row_DAO implements IteratorAggregate, Countable
|
|||||||
* @throws PDOException On PDO operation error.
|
* @throws PDOException On PDO operation error.
|
||||||
* @return int Count of ranks.
|
* @return int Count of ranks.
|
||||||
*/
|
*/
|
||||||
public function count()
|
public function count(): int
|
||||||
{
|
{
|
||||||
return $this->getGuildRanksList()->count();
|
return $this->getGuildRanksList()->count();
|
||||||
}
|
}
|
||||||
|
@ -396,6 +396,7 @@ class OTS_GuildRank extends OTS_Row_DAO implements IteratorAggregate, Countable
|
|||||||
* @throws PDOException On PDO operation error.
|
* @throws PDOException On PDO operation error.
|
||||||
* @return Iterator List of players.
|
* @return Iterator List of players.
|
||||||
*/
|
*/
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public function getIterator()
|
public function getIterator()
|
||||||
{
|
{
|
||||||
return $this->getPlayersList();
|
return $this->getPlayersList();
|
||||||
@ -410,7 +411,7 @@ class OTS_GuildRank extends OTS_Row_DAO implements IteratorAggregate, Countable
|
|||||||
* @throws PDOException On PDO operation error.
|
* @throws PDOException On PDO operation error.
|
||||||
* @return int Count of players.
|
* @return int Count of players.
|
||||||
*/
|
*/
|
||||||
public function count()
|
public function count(): int
|
||||||
{
|
{
|
||||||
return $this->getPlayersList()->count();
|
return $this->getPlayersList()->count();
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Wrapper for houses list.
|
* Wrapper for houses list.
|
||||||
*
|
*
|
||||||
* @package POT
|
* @package POT
|
||||||
* @version 0.1.3
|
* @version 0.1.3
|
||||||
* @tutorial POT/data_directory.pkg#towns.houses
|
* @tutorial POT/data_directory.pkg#towns.houses
|
||||||
@ -24,14 +24,14 @@ class OTS_HousesList implements IteratorAggregate, Countable, ArrayAccess
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* List of houses elements.
|
* List of houses elements.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
private $houses = array();
|
private $houses = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads houses information.
|
* Loads houses information.
|
||||||
*
|
*
|
||||||
* @version 0.1.3
|
* @version 0.1.3
|
||||||
* @param string $path Houses file.
|
* @param string $path Houses file.
|
||||||
* @throws DOMException On DOM operation error.
|
* @throws DOMException On DOM operation error.
|
||||||
@ -49,11 +49,11 @@ class OTS_HousesList implements IteratorAggregate, Countable, ArrayAccess
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Magic PHP5 method.
|
* Magic PHP5 method.
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* Allows object importing from {@link http://www.php.net/manual/en/function.var-export.php var_export()}.
|
* Allows object importing from {@link http://www.php.net/manual/en/function.var-export.php var_export()}.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @param array $properties List of object properties.
|
* @param array $properties List of object properties.
|
||||||
* @throws DOMException On DOM operation error.
|
* @throws DOMException On DOM operation error.
|
||||||
*/
|
*/
|
||||||
@ -72,7 +72,7 @@ class OTS_HousesList implements IteratorAggregate, Countable, ArrayAccess
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if given house exists on list.
|
* Checks if given house exists on list.
|
||||||
*
|
*
|
||||||
* @version 0.1.3
|
* @version 0.1.3
|
||||||
* @since 0.1.3
|
* @since 0.1.3
|
||||||
* @param string $name Name.
|
* @param string $name Name.
|
||||||
@ -94,7 +94,7 @@ class OTS_HousesList implements IteratorAggregate, Countable, ArrayAccess
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns house information.
|
* Returns house information.
|
||||||
*
|
*
|
||||||
* @version 0.1.3
|
* @version 0.1.3
|
||||||
* @param int $id House ID.
|
* @param int $id House ID.
|
||||||
* @return OTS_House House information wrapper.
|
* @return OTS_House House information wrapper.
|
||||||
@ -112,7 +112,7 @@ class OTS_HousesList implements IteratorAggregate, Countable, ArrayAccess
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if given house ID exists on list.
|
* Checks if given house ID exists on list.
|
||||||
*
|
*
|
||||||
* @version 0.1.3
|
* @version 0.1.3
|
||||||
* @since 0.1.3
|
* @since 0.1.3
|
||||||
* @param int $id ID.
|
* @param int $id ID.
|
||||||
@ -125,7 +125,7 @@ class OTS_HousesList implements IteratorAggregate, Countable, ArrayAccess
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns ID of house with given name.
|
* Returns ID of house with given name.
|
||||||
*
|
*
|
||||||
* @version 0.1.3
|
* @version 0.1.3
|
||||||
* @param string $name House name.
|
* @param string $name House name.
|
||||||
* @return int House ID.
|
* @return int House ID.
|
||||||
@ -147,17 +147,17 @@ class OTS_HousesList implements IteratorAggregate, Countable, ArrayAccess
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns amount of houses.
|
* Returns amount of houses.
|
||||||
*
|
*
|
||||||
* @return int Count of houses.
|
* @return int Count of houses.
|
||||||
*/
|
*/
|
||||||
public function count()
|
public function count(): int
|
||||||
{
|
{
|
||||||
return count($this->houses);
|
return count($this->houses);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns iterator handle for loops.
|
* Returns iterator handle for loops.
|
||||||
*
|
*
|
||||||
* @return ArrayIterator Houses list iterator.
|
* @return ArrayIterator Houses list iterator.
|
||||||
*/
|
*/
|
||||||
public function getIterator()
|
public function getIterator()
|
||||||
@ -167,7 +167,7 @@ class OTS_HousesList implements IteratorAggregate, Countable, ArrayAccess
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if given element exists.
|
* Checks if given element exists.
|
||||||
*
|
*
|
||||||
* @param string|int $offset Array key.
|
* @param string|int $offset Array key.
|
||||||
* @return bool True if it's set.
|
* @return bool True if it's set.
|
||||||
*/
|
*/
|
||||||
@ -185,7 +185,7 @@ class OTS_HousesList implements IteratorAggregate, Countable, ArrayAccess
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns item from given position.
|
* Returns item from given position.
|
||||||
*
|
*
|
||||||
* @version 0.1.3
|
* @version 0.1.3
|
||||||
* @param string|int $offset Array key.
|
* @param string|int $offset Array key.
|
||||||
* @return OTS_House|int If key is an integer (type-sensitive!) then returns house instance. If it's a string then return associated ID found by house name.
|
* @return OTS_House|int If key is an integer (type-sensitive!) then returns house instance. If it's a string then return associated ID found by house name.
|
||||||
@ -204,7 +204,7 @@ class OTS_HousesList implements IteratorAggregate, Countable, ArrayAccess
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This method is implemented for ArrayAccess interface. In fact you can't write/append to houses list. Any call to this method will cause {@link E_OTS_ReadOnly E_OTS_ReadOnly} raise.
|
* This method is implemented for ArrayAccess interface. In fact you can't write/append to houses list. Any call to this method will cause {@link E_OTS_ReadOnly E_OTS_ReadOnly} raise.
|
||||||
*
|
*
|
||||||
* @param string|int $offset Array key.
|
* @param string|int $offset Array key.
|
||||||
* @param mixed $value Field value.
|
* @param mixed $value Field value.
|
||||||
* @throws E_OTS_ReadOnly Always - this class is read-only.
|
* @throws E_OTS_ReadOnly Always - this class is read-only.
|
||||||
@ -216,7 +216,7 @@ class OTS_HousesList implements IteratorAggregate, Countable, ArrayAccess
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This method is implemented for ArrayAccess interface. In fact you can't write/append to houses list. Any call to this method will cause {@link E_OTS_ReadOnly E_OTS_ReadOnly} raise.
|
* This method is implemented for ArrayAccess interface. In fact you can't write/append to houses list. Any call to this method will cause {@link E_OTS_ReadOnly E_OTS_ReadOnly} raise.
|
||||||
*
|
*
|
||||||
* @param string|int $offset Array key.
|
* @param string|int $offset Array key.
|
||||||
* @throws E_OTS_ReadOnly Always - this class is read-only.
|
* @throws E_OTS_ReadOnly Always - this class is read-only.
|
||||||
*/
|
*/
|
||||||
@ -227,11 +227,11 @@ class OTS_HousesList implements IteratorAggregate, Countable, ArrayAccess
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns string representation of object.
|
* Returns string representation of object.
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* If any display driver is currently loaded then it uses it's method.
|
* If any display driver is currently loaded then it uses it's method.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @version 0.1.3
|
* @version 0.1.3
|
||||||
* @since 0.1.3
|
* @since 0.1.3
|
||||||
* @return string String representation of object.
|
* @return string String representation of object.
|
||||||
|
@ -15,11 +15,11 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Single item representation.
|
* Single item representation.
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* This class represents item that player has. It has no information about item feature, just it's handle in database. To get information about item type and it's features you have to use {@link OTS_ItemType OTS_ItemType class} - you can get it's object by calling {@link OTS_Item::getItemType() getItemType() method}, however you need to have global item types list loaded.
|
* This class represents item that player has. It has no information about item feature, just it's handle in database. To get information about item type and it's features you have to use {@link OTS_ItemType OTS_ItemType class} - you can get it's object by calling {@link OTS_Item::getItemType() getItemType() method}, however you need to have global item types list loaded.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @package POT
|
* @package POT
|
||||||
* @version 0.1.0
|
* @version 0.1.0
|
||||||
* @property int $count Amount of item.
|
* @property int $count Amount of item.
|
||||||
@ -31,28 +31,28 @@ class OTS_Item implements Countable
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Item ID.
|
* Item ID.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
private $id;
|
private $id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Item count.
|
* Item count.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
private $count = 0;
|
private $count = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Additional attributes.
|
* Additional attributes.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
private $attributes;
|
private $attributes;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates item of given ID.
|
* Creates item of given ID.
|
||||||
*
|
*
|
||||||
* @param int $id Item ID.
|
* @param int $id Item ID.
|
||||||
*/
|
*/
|
||||||
public function __construct($id)
|
public function __construct($id)
|
||||||
@ -62,7 +62,7 @@ class OTS_Item implements Countable
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns item type.
|
* Returns item type.
|
||||||
*
|
*
|
||||||
* @return int Item ID.
|
* @return int Item ID.
|
||||||
*/
|
*/
|
||||||
public function getId()
|
public function getId()
|
||||||
@ -72,7 +72,7 @@ class OTS_Item implements Countable
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns count of item.
|
* Returns count of item.
|
||||||
*
|
*
|
||||||
* @return int Count of item.
|
* @return int Count of item.
|
||||||
*/
|
*/
|
||||||
public function getCount()
|
public function getCount()
|
||||||
@ -82,7 +82,7 @@ class OTS_Item implements Countable
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets count of item.
|
* Sets count of item.
|
||||||
*
|
*
|
||||||
* @param int $count Count.
|
* @param int $count Count.
|
||||||
*/
|
*/
|
||||||
public function setCount($count)
|
public function setCount($count)
|
||||||
@ -92,7 +92,7 @@ class OTS_Item implements Countable
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns item custom attributes.
|
* Returns item custom attributes.
|
||||||
*
|
*
|
||||||
* @return string Attributes.
|
* @return string Attributes.
|
||||||
*/
|
*/
|
||||||
public function getAttributes()
|
public function getAttributes()
|
||||||
@ -102,7 +102,7 @@ class OTS_Item implements Countable
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets item attributes.
|
* Sets item attributes.
|
||||||
*
|
*
|
||||||
* @param string $attributes Item Attributes.
|
* @param string $attributes Item Attributes.
|
||||||
*/
|
*/
|
||||||
public function setAttributes($attributes)
|
public function setAttributes($attributes)
|
||||||
@ -112,7 +112,7 @@ class OTS_Item implements Countable
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns type of item.
|
* Returns type of item.
|
||||||
*
|
*
|
||||||
* @version 0.1.0
|
* @version 0.1.0
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
* @return OTS_ItemType Returns item type of item (null if not exists).
|
* @return OTS_ItemType Returns item type of item (null if not exists).
|
||||||
@ -125,17 +125,17 @@ class OTS_Item implements Countable
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Count value for current item.
|
* Count value for current item.
|
||||||
*
|
*
|
||||||
* @return int Count of item.
|
* @return int Count of item.
|
||||||
*/
|
*/
|
||||||
public function count()
|
public function count(): int
|
||||||
{
|
{
|
||||||
return $this->count;
|
return $this->count;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Magic PHP5 method.
|
* Magic PHP5 method.
|
||||||
*
|
*
|
||||||
* @version 0.1.0
|
* @version 0.1.0
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
* @param string $name Property name.
|
* @param string $name Property name.
|
||||||
@ -166,7 +166,7 @@ class OTS_Item implements Countable
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Magic PHP5 method.
|
* Magic PHP5 method.
|
||||||
*
|
*
|
||||||
* @version 0.1.0
|
* @version 0.1.0
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
* @param string $name Property name.
|
* @param string $name Property name.
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Code in this file bases on oryginal OTServ items loading C++ code (itemloader.h, items.cpp, items.h).
|
* Code in this file bases on oryginal OTServ items loading C++ code (itemloader.h, items.cpp, items.h).
|
||||||
*
|
*
|
||||||
* @package POT
|
* @package POT
|
||||||
* @version 0.1.3
|
* @version 0.1.3
|
||||||
* @author Wrzasq <wrzasq@gmail.com>
|
* @author Wrzasq <wrzasq@gmail.com>
|
||||||
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Items list loader.
|
* Items list loader.
|
||||||
*
|
*
|
||||||
* @package POT
|
* @package POT
|
||||||
* @version 0.1.3
|
* @version 0.1.3
|
||||||
* @property-read int $otbVersion OTB file version.
|
* @property-read int $otbVersion OTB file version.
|
||||||
@ -88,35 +88,35 @@ class OTS_ItemsList extends OTS_FileLoader implements IteratorAggregate, Countab
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Temple positions.
|
* Temple positions.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
private $items = array();
|
private $items = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* OTB version.
|
* OTB version.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
private $otbVersion;
|
private $otbVersion;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Client version.
|
* Client version.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
private $clientVersion;
|
private $clientVersion;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build version.
|
* Build version.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
private $buildVersion;
|
private $buildVersion;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Magic PHP5 method.
|
* Magic PHP5 method.
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* Allows object unserialisation.
|
* Allows object unserialisation.
|
||||||
* </p>
|
* </p>
|
||||||
@ -129,11 +129,11 @@ class OTS_ItemsList extends OTS_FileLoader implements IteratorAggregate, Countab
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads items.xml and items.otb files.
|
* Loads items.xml and items.otb files.
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* This method loads both items.xml and items.otb files. Both of them has to be in given directory.
|
* This method loads both items.xml and items.otb files. Both of them has to be in given directory.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @version 0.1.3
|
* @version 0.1.3
|
||||||
* @param string $path Path to data/items directory.
|
* @param string $path Path to data/items directory.
|
||||||
* @throws E_OTS_FileLoaderError When error occurs during file operation.
|
* @throws E_OTS_FileLoaderError When error occurs during file operation.
|
||||||
@ -191,7 +191,7 @@ class OTS_ItemsList extends OTS_FileLoader implements IteratorAggregate, Countab
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Parses loaded file.
|
* Parses loaded file.
|
||||||
*
|
*
|
||||||
* @version 0.1.0
|
* @version 0.1.0
|
||||||
* @throws E_OTS_FileLoaderError If file has invalid format.
|
* @throws E_OTS_FileLoaderError If file has invalid format.
|
||||||
*/
|
*/
|
||||||
@ -378,7 +378,7 @@ class OTS_ItemsList extends OTS_FileLoader implements IteratorAggregate, Countab
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns OTB file version.
|
* Returns OTB file version.
|
||||||
*
|
*
|
||||||
* @return int OTB format version.
|
* @return int OTB format version.
|
||||||
*/
|
*/
|
||||||
public function getOTBVersion()
|
public function getOTBVersion()
|
||||||
@ -388,7 +388,7 @@ class OTS_ItemsList extends OTS_FileLoader implements IteratorAggregate, Countab
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns client version.
|
* Returns client version.
|
||||||
*
|
*
|
||||||
* @return int Client version.
|
* @return int Client version.
|
||||||
*/
|
*/
|
||||||
public function getClientVersion()
|
public function getClientVersion()
|
||||||
@ -398,7 +398,7 @@ class OTS_ItemsList extends OTS_FileLoader implements IteratorAggregate, Countab
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns build version.
|
* Returns build version.
|
||||||
*
|
*
|
||||||
* @return int Build version.
|
* @return int Build version.
|
||||||
*/
|
*/
|
||||||
public function getBuildVersion()
|
public function getBuildVersion()
|
||||||
@ -408,7 +408,7 @@ class OTS_ItemsList extends OTS_FileLoader implements IteratorAggregate, Countab
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if given item type exists on list.
|
* Checks if given item type exists on list.
|
||||||
*
|
*
|
||||||
* @version 0.1.3
|
* @version 0.1.3
|
||||||
* @since 0.1.3
|
* @since 0.1.3
|
||||||
* @param string $name Name.
|
* @param string $name Name.
|
||||||
@ -430,7 +430,7 @@ class OTS_ItemsList extends OTS_FileLoader implements IteratorAggregate, Countab
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns given item type.
|
* Returns given item type.
|
||||||
*
|
*
|
||||||
* @version 0.1.3
|
* @version 0.1.3
|
||||||
* @param int $id Item type (server) ID.
|
* @param int $id Item type (server) ID.
|
||||||
* @return OTS_ItemType Returns item type of given ID.
|
* @return OTS_ItemType Returns item type of given ID.
|
||||||
@ -448,7 +448,7 @@ class OTS_ItemsList extends OTS_FileLoader implements IteratorAggregate, Countab
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if given type ID exists on list.
|
* Checks if given type ID exists on list.
|
||||||
*
|
*
|
||||||
* @version 0.1.3
|
* @version 0.1.3
|
||||||
* @since 0.1.3
|
* @since 0.1.3
|
||||||
* @param int $id ID.
|
* @param int $id ID.
|
||||||
@ -461,11 +461,11 @@ class OTS_ItemsList extends OTS_FileLoader implements IteratorAggregate, Countab
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Finds item type by it's name.
|
* Finds item type by it's name.
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* Note: If there are more then one items with same name this function will return first found server ID. It doesn't also mean that it will be the lowest ID - item types are ordered in order that they were loaded from items.xml file.
|
* Note: If there are more then one items with same name this function will return first found server ID. It doesn't also mean that it will be the lowest ID - item types are ordered in order that they were loaded from items.xml file.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @version 0.1.3
|
* @version 0.1.3
|
||||||
* @param string $name Item type name.
|
* @param string $name Item type name.
|
||||||
* @return int Returns item type (server) ID.
|
* @return int Returns item type (server) ID.
|
||||||
@ -497,10 +497,10 @@ class OTS_ItemsList extends OTS_FileLoader implements IteratorAggregate, Countab
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns amount of items loaded.
|
* Returns amount of items loaded.
|
||||||
*
|
*
|
||||||
* @return int Count of types.
|
* @return int Count of types.
|
||||||
*/
|
*/
|
||||||
public function count()
|
public function count(): int
|
||||||
{
|
{
|
||||||
return count($this->items);
|
return count($this->items);
|
||||||
}
|
}
|
||||||
@ -550,7 +550,7 @@ class OTS_ItemsList extends OTS_FileLoader implements IteratorAggregate, Countab
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns iterator handle for loops.
|
* Returns iterator handle for loops.
|
||||||
*
|
*
|
||||||
* @version 0.1.0
|
* @version 0.1.0
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
* @return ArrayIterator Items list iterator.
|
* @return ArrayIterator Items list iterator.
|
||||||
@ -562,7 +562,7 @@ class OTS_ItemsList extends OTS_FileLoader implements IteratorAggregate, Countab
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if given element exists.
|
* Checks if given element exists.
|
||||||
*
|
*
|
||||||
* @version 0.1.0
|
* @version 0.1.0
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
* @param string|int $offset Array key.
|
* @param string|int $offset Array key.
|
||||||
@ -582,7 +582,7 @@ class OTS_ItemsList extends OTS_FileLoader implements IteratorAggregate, Countab
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns item from given position.
|
* Returns item from given position.
|
||||||
*
|
*
|
||||||
* @version 0.1.3
|
* @version 0.1.3
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
* @param string|int $offset Array key.
|
* @param string|int $offset Array key.
|
||||||
@ -602,7 +602,7 @@ class OTS_ItemsList extends OTS_FileLoader implements IteratorAggregate, Countab
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This method is implemented for ArrayAccess interface. In fact you can't write/append to items list. Any call to this method will cause {@link E_OTS_ReadOnly E_OTS_ReadOnly} raise.
|
* This method is implemented for ArrayAccess interface. In fact you can't write/append to items list. Any call to this method will cause {@link E_OTS_ReadOnly E_OTS_ReadOnly} raise.
|
||||||
*
|
*
|
||||||
* @version 0.1.0
|
* @version 0.1.0
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
* @param string|int $offset Array key.
|
* @param string|int $offset Array key.
|
||||||
@ -616,7 +616,7 @@ class OTS_ItemsList extends OTS_FileLoader implements IteratorAggregate, Countab
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This method is implemented for ArrayAccess interface. In fact you can't write/append to items list. Any call to this method will cause {@link E_OTS_ReadOnly E_OTS_ReadOnly} raise.
|
* This method is implemented for ArrayAccess interface. In fact you can't write/append to items list. Any call to this method will cause {@link E_OTS_ReadOnly E_OTS_ReadOnly} raise.
|
||||||
*
|
*
|
||||||
* @version 0.1.0
|
* @version 0.1.0
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
* @param string|int $offset Array key.
|
* @param string|int $offset Array key.
|
||||||
@ -629,7 +629,7 @@ class OTS_ItemsList extends OTS_FileLoader implements IteratorAggregate, Countab
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Magic PHP5 method.
|
* Magic PHP5 method.
|
||||||
*
|
*
|
||||||
* @version 0.1.0
|
* @version 0.1.0
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
* @param string $name Property name.
|
* @param string $name Property name.
|
||||||
@ -652,11 +652,11 @@ class OTS_ItemsList extends OTS_FileLoader implements IteratorAggregate, Countab
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns string representation of object.
|
* Returns string representation of object.
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* If any display driver is currently loaded then it uses it's method.
|
* If any display driver is currently loaded then it uses it's method.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @version 0.1.3
|
* @version 0.1.3
|
||||||
* @since 0.1.3
|
* @since 0.1.3
|
||||||
* @return string String representation of object.
|
* @return string String representation of object.
|
||||||
|
@ -163,7 +163,7 @@ class OTS_MonstersList implements Iterator, Countable, ArrayAccess
|
|||||||
*
|
*
|
||||||
* @return int Count of monsters.
|
* @return int Count of monsters.
|
||||||
*/
|
*/
|
||||||
public function count()
|
public function count(): int
|
||||||
{
|
{
|
||||||
return count($this->monsters);
|
return count($this->monsters);
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Code in this file bases on oryginal OTServ OTBM format loading C++ code (iomapotbm.h, iomapotbm.cpp).
|
* Code in this file bases on oryginal OTServ OTBM format loading C++ code (iomapotbm.h, iomapotbm.cpp).
|
||||||
*
|
*
|
||||||
* @package POT
|
* @package POT
|
||||||
* @version 0.1.3
|
* @version 0.1.3
|
||||||
* @author Wrzasq <wrzasq@gmail.com>
|
* @author Wrzasq <wrzasq@gmail.com>
|
||||||
@ -20,11 +20,11 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* OTBM format reader.
|
* OTBM format reader.
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* POT OTBM file parser is less strict then oryginal OTServ one. For instance it will read waypoints from version 1 OTBM file even that there were no waypoints in that format.
|
* POT OTBM file parser is less strict then oryginal OTServ one. For instance it will read waypoints from version 1 OTBM file even that there were no waypoints in that format.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @package POT
|
* @package POT
|
||||||
* @version 0.1.6
|
* @version 0.1.6
|
||||||
* @property-read OTS_HousesList $housesList Houses list loaded from associated houses file.
|
* @property-read OTS_HousesList $housesList Houses list loaded from associated houses file.
|
||||||
@ -95,56 +95,56 @@ class OTS_OTBMFile extends OTS_FileLoader implements IteratorAggregate, Countabl
|
|||||||
const OTBM_ATTR_HOUSEDOORID = 14;
|
const OTBM_ATTR_HOUSEDOORID = 14;
|
||||||
/**
|
/**
|
||||||
* Amount.
|
* Amount.
|
||||||
*
|
*
|
||||||
* @version 0.1.6
|
* @version 0.1.6
|
||||||
* @since 0.1.6
|
* @since 0.1.6
|
||||||
*/
|
*/
|
||||||
const OTBM_ATTR_COUNT = 15;
|
const OTBM_ATTR_COUNT = 15;
|
||||||
/**
|
/**
|
||||||
* Time interval.
|
* Time interval.
|
||||||
*
|
*
|
||||||
* @version 0.1.6
|
* @version 0.1.6
|
||||||
* @since 0.1.6
|
* @since 0.1.6
|
||||||
*/
|
*/
|
||||||
const OTBM_ATTR_DURATION = 16;
|
const OTBM_ATTR_DURATION = 16;
|
||||||
/**
|
/**
|
||||||
* Metamorphic stage.
|
* Metamorphic stage.
|
||||||
*
|
*
|
||||||
* @version 0.1.6
|
* @version 0.1.6
|
||||||
* @since 0.1.6
|
* @since 0.1.6
|
||||||
*/
|
*/
|
||||||
const OTBM_ATTR_DECAYING_STATE = 17;
|
const OTBM_ATTR_DECAYING_STATE = 17;
|
||||||
/**
|
/**
|
||||||
* Date of being written.
|
* Date of being written.
|
||||||
*
|
*
|
||||||
* @version 0.1.6
|
* @version 0.1.6
|
||||||
* @since 0.1.6
|
* @since 0.1.6
|
||||||
*/
|
*/
|
||||||
const OTBM_ATTR_WRITTENDATE = 18;
|
const OTBM_ATTR_WRITTENDATE = 18;
|
||||||
/**
|
/**
|
||||||
* Sign author.
|
* Sign author.
|
||||||
*
|
*
|
||||||
* @version 0.1.6
|
* @version 0.1.6
|
||||||
* @since 0.1.6
|
* @since 0.1.6
|
||||||
*/
|
*/
|
||||||
const OTBM_ATTR_WRITTENBY = 19;
|
const OTBM_ATTR_WRITTENBY = 19;
|
||||||
/**
|
/**
|
||||||
* Sleeping player ID.
|
* Sleeping player ID.
|
||||||
*
|
*
|
||||||
* @version 0.1.6
|
* @version 0.1.6
|
||||||
* @since 0.1.6
|
* @since 0.1.6
|
||||||
*/
|
*/
|
||||||
const OTBM_ATTR_SLEEPERGUID = 20;
|
const OTBM_ATTR_SLEEPERGUID = 20;
|
||||||
/**
|
/**
|
||||||
* Time of sleep started.
|
* Time of sleep started.
|
||||||
*
|
*
|
||||||
* @version 0.1.6
|
* @version 0.1.6
|
||||||
* @since 0.1.6
|
* @since 0.1.6
|
||||||
*/
|
*/
|
||||||
const OTBM_ATTR_SLEEPSTART = 21;
|
const OTBM_ATTR_SLEEPSTART = 21;
|
||||||
/**
|
/**
|
||||||
* Number of charges.
|
* Number of charges.
|
||||||
*
|
*
|
||||||
* @version 0.1.6
|
* @version 0.1.6
|
||||||
* @since 0.1.6
|
* @since 0.1.6
|
||||||
*/
|
*/
|
||||||
@ -208,14 +208,14 @@ class OTS_OTBMFile extends OTS_FileLoader implements IteratorAggregate, Countabl
|
|||||||
const OTBM_NODE_HOUSETILE = 14;
|
const OTBM_NODE_HOUSETILE = 14;
|
||||||
/**
|
/**
|
||||||
* Waypoints list.
|
* Waypoints list.
|
||||||
*
|
*
|
||||||
* @version 0.1.6
|
* @version 0.1.6
|
||||||
* @since 0.1.6
|
* @since 0.1.6
|
||||||
*/
|
*/
|
||||||
const OTBM_NODE_WAYPOINTS = 15;
|
const OTBM_NODE_WAYPOINTS = 15;
|
||||||
/**
|
/**
|
||||||
* Waypoint.
|
* Waypoint.
|
||||||
*
|
*
|
||||||
* @version 0.1.6
|
* @version 0.1.6
|
||||||
* @since 0.1.6
|
* @since 0.1.6
|
||||||
*/
|
*/
|
||||||
@ -223,56 +223,56 @@ class OTS_OTBMFile extends OTS_FileLoader implements IteratorAggregate, Countabl
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Map width.
|
* Map width.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
private $width;
|
private $width;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Map height.
|
* Map height.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
private $height;
|
private $height;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Map description.
|
* Map description.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
private $description = '';
|
private $description = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List of towns.
|
* List of towns.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
private $towns = array();
|
private $towns = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Temple positions.
|
* Temple positions.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
private $temples = array();
|
private $temples = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Directory path.
|
* Directory path.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
private $directory;
|
private $directory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* External houses file.
|
* External houses file.
|
||||||
*
|
*
|
||||||
* @var OTS_HousesList
|
* @var OTS_HousesList
|
||||||
*/
|
*/
|
||||||
private $housesList;
|
private $housesList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List of map tracks.
|
* List of map tracks.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @version 0.1.6
|
* @version 0.1.6
|
||||||
* @since 0.1.6
|
* @since 0.1.6
|
||||||
@ -281,11 +281,11 @@ class OTS_OTBMFile extends OTS_FileLoader implements IteratorAggregate, Countabl
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Magic PHP5 method.
|
* Magic PHP5 method.
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* Allows object unserialisation.
|
* Allows object unserialisation.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @throws E_OTS_FileLoaderError When error occurs during file operation.
|
* @throws E_OTS_FileLoaderError When error occurs during file operation.
|
||||||
*/
|
*/
|
||||||
public function __wakeup()
|
public function __wakeup()
|
||||||
@ -296,7 +296,7 @@ class OTS_OTBMFile extends OTS_FileLoader implements IteratorAggregate, Countabl
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads OTBM file content.
|
* Loads OTBM file content.
|
||||||
*
|
*
|
||||||
* @version 0.1.0
|
* @version 0.1.0
|
||||||
* @param string $file Filename.
|
* @param string $file Filename.
|
||||||
* @throws E_OTS_FileLoaderError When error occurs during file operation.
|
* @throws E_OTS_FileLoaderError When error occurs during file operation.
|
||||||
@ -316,7 +316,7 @@ class OTS_OTBMFile extends OTS_FileLoader implements IteratorAggregate, Countabl
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Parses loaded file.
|
* Parses loaded file.
|
||||||
*
|
*
|
||||||
* @version 0.1.0
|
* @version 0.1.0
|
||||||
* @throws E_OTS_FileLoaderError When error occurs during file operation.
|
* @throws E_OTS_FileLoaderError When error occurs during file operation.
|
||||||
* @throws E_OTS_OutOfBuffer When there is read attemp after end of stream.
|
* @throws E_OTS_OutOfBuffer When there is read attemp after end of stream.
|
||||||
@ -476,7 +476,7 @@ class OTS_OTBMFile extends OTS_FileLoader implements IteratorAggregate, Countabl
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads map's houses list.
|
* Loads map's houses list.
|
||||||
*
|
*
|
||||||
* @version 0.1.0
|
* @version 0.1.0
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
* @return OTS_HousesList Houses from external file.
|
* @return OTS_HousesList Houses from external file.
|
||||||
@ -488,7 +488,7 @@ class OTS_OTBMFile extends OTS_FileLoader implements IteratorAggregate, Countabl
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns map width.
|
* Returns map width.
|
||||||
*
|
*
|
||||||
* @return int Map width.
|
* @return int Map width.
|
||||||
*/
|
*/
|
||||||
public function getWidth()
|
public function getWidth()
|
||||||
@ -498,7 +498,7 @@ class OTS_OTBMFile extends OTS_FileLoader implements IteratorAggregate, Countabl
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns map height.
|
* Returns map height.
|
||||||
*
|
*
|
||||||
* @return int Map height.
|
* @return int Map height.
|
||||||
*/
|
*/
|
||||||
public function getHeight()
|
public function getHeight()
|
||||||
@ -508,7 +508,7 @@ class OTS_OTBMFile extends OTS_FileLoader implements IteratorAggregate, Countabl
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns map description.
|
* Returns map description.
|
||||||
*
|
*
|
||||||
* @return string Map description.
|
* @return string Map description.
|
||||||
*/
|
*/
|
||||||
public function getDescription()
|
public function getDescription()
|
||||||
@ -518,11 +518,11 @@ class OTS_OTBMFile extends OTS_FileLoader implements IteratorAggregate, Countabl
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns map waypoints list.
|
* Returns map waypoints list.
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* Each item of returned array is sub-array with list of waypoints.
|
* Each item of returned array is sub-array with list of waypoints.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @version 0.1.6
|
* @version 0.1.6
|
||||||
* @since 0.1.6
|
* @since 0.1.6
|
||||||
* @return array List of tracks.
|
* @return array List of tracks.
|
||||||
@ -534,7 +534,7 @@ class OTS_OTBMFile extends OTS_FileLoader implements IteratorAggregate, Countabl
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if given town ID exists on list.
|
* Checks if given town ID exists on list.
|
||||||
*
|
*
|
||||||
* @version 0.1.3
|
* @version 0.1.3
|
||||||
* @since 0.1.3
|
* @since 0.1.3
|
||||||
* @param int $id ID.
|
* @param int $id ID.
|
||||||
@ -547,7 +547,7 @@ class OTS_OTBMFile extends OTS_FileLoader implements IteratorAggregate, Countabl
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns town's ID.
|
* Returns town's ID.
|
||||||
*
|
*
|
||||||
* @version 0.1.3
|
* @version 0.1.3
|
||||||
* @param string $name Town.
|
* @param string $name Town.
|
||||||
* @return int ID.
|
* @return int ID.
|
||||||
@ -567,7 +567,7 @@ class OTS_OTBMFile extends OTS_FileLoader implements IteratorAggregate, Countabl
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if given town name exists on list.
|
* Checks if given town name exists on list.
|
||||||
*
|
*
|
||||||
* @version 0.1.3
|
* @version 0.1.3
|
||||||
* @since 0.1.3
|
* @since 0.1.3
|
||||||
* @param string $name Town.
|
* @param string $name Town.
|
||||||
@ -580,7 +580,7 @@ class OTS_OTBMFile extends OTS_FileLoader implements IteratorAggregate, Countabl
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns name of given town's ID.
|
* Returns name of given town's ID.
|
||||||
*
|
*
|
||||||
* @version 0.1.3
|
* @version 0.1.3
|
||||||
* @param int $id Town ID.
|
* @param int $id Town ID.
|
||||||
* @return string Name.
|
* @return string Name.
|
||||||
@ -607,7 +607,7 @@ class OTS_OTBMFile extends OTS_FileLoader implements IteratorAggregate, Countabl
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns town's temple position.
|
* Returns town's temple position.
|
||||||
*
|
*
|
||||||
* @param int $id Town id.
|
* @param int $id Town id.
|
||||||
* @return OTS_MapCoords|bool Point on map (false if not found).
|
* @return OTS_MapCoords|bool Point on map (false if not found).
|
||||||
*/
|
*/
|
||||||
@ -625,12 +625,12 @@ class OTS_OTBMFile extends OTS_FileLoader implements IteratorAggregate, Countabl
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns amount of towns loaded.
|
* Returns amount of towns loaded.
|
||||||
*
|
*
|
||||||
* @version 0.0.8
|
* @version 0.0.8
|
||||||
* @since 0.0.8
|
* @since 0.0.8
|
||||||
* @return int Count of towns.
|
* @return int Count of towns.
|
||||||
*/
|
*/
|
||||||
public function count()
|
public function count(): int
|
||||||
{
|
{
|
||||||
return count($this->towns);
|
return count($this->towns);
|
||||||
}
|
}
|
||||||
@ -690,7 +690,7 @@ class OTS_OTBMFile extends OTS_FileLoader implements IteratorAggregate, Countabl
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns iterator handle for loops.
|
* Returns iterator handle for loops.
|
||||||
*
|
*
|
||||||
* @version 0.1.0
|
* @version 0.1.0
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
* @return ArrayIterator Towns list iterator.
|
* @return ArrayIterator Towns list iterator.
|
||||||
@ -702,7 +702,7 @@ class OTS_OTBMFile extends OTS_FileLoader implements IteratorAggregate, Countabl
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if given element exists.
|
* Checks if given element exists.
|
||||||
*
|
*
|
||||||
* @version 0.1.0
|
* @version 0.1.0
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
* @param string|int $offset Array key.
|
* @param string|int $offset Array key.
|
||||||
@ -724,7 +724,7 @@ class OTS_OTBMFile extends OTS_FileLoader implements IteratorAggregate, Countabl
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns item from given position.
|
* Returns item from given position.
|
||||||
*
|
*
|
||||||
* @version 0.1.0
|
* @version 0.1.0
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
* @param string|int $offset Array key.
|
* @param string|int $offset Array key.
|
||||||
@ -754,7 +754,7 @@ class OTS_OTBMFile extends OTS_FileLoader implements IteratorAggregate, Countabl
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This method is implemented for ArrayAccess interface. In fact you can't write/append to towns list. Any call to this method will cause {@link E_OTS_ReadOnly E_OTS_ReadOnly} raise.
|
* This method is implemented for ArrayAccess interface. In fact you can't write/append to towns list. Any call to this method will cause {@link E_OTS_ReadOnly E_OTS_ReadOnly} raise.
|
||||||
*
|
*
|
||||||
* @version 0.1.0
|
* @version 0.1.0
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
* @param string|int $offset Array key.
|
* @param string|int $offset Array key.
|
||||||
@ -768,7 +768,7 @@ class OTS_OTBMFile extends OTS_FileLoader implements IteratorAggregate, Countabl
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This method is implemented for ArrayAccess interface. In fact you can't write/append to towns list. Any call to this method will cause {@link E_OTS_ReadOnly E_OTS_ReadOnly} raise.
|
* This method is implemented for ArrayAccess interface. In fact you can't write/append to towns list. Any call to this method will cause {@link E_OTS_ReadOnly E_OTS_ReadOnly} raise.
|
||||||
*
|
*
|
||||||
* @version 0.1.0
|
* @version 0.1.0
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
* @param string|int $offset Array key.
|
* @param string|int $offset Array key.
|
||||||
@ -781,7 +781,7 @@ class OTS_OTBMFile extends OTS_FileLoader implements IteratorAggregate, Countabl
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Magic PHP5 method.
|
* Magic PHP5 method.
|
||||||
*
|
*
|
||||||
* @version 0.1.0
|
* @version 0.1.0
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
* @param string $name Property name.
|
* @param string $name Property name.
|
||||||
@ -814,11 +814,11 @@ class OTS_OTBMFile extends OTS_FileLoader implements IteratorAggregate, Countabl
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns string representation of object.
|
* Returns string representation of object.
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* If any display driver is currently loaded then it uses it's method.
|
* If any display driver is currently loaded then it uses it's method.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @version 0.1.3
|
* @version 0.1.3
|
||||||
* @since 0.1.3
|
* @since 0.1.3
|
||||||
* @return string String representation of object.
|
* @return string String representation of object.
|
||||||
|
@ -324,7 +324,7 @@ class OTS_SpellsList implements IteratorAggregate, Countable
|
|||||||
* @since 0.1.5
|
* @since 0.1.5
|
||||||
* @return int Amount of all spells.
|
* @return int Amount of all spells.
|
||||||
*/
|
*/
|
||||||
public function count()
|
public function count(): int
|
||||||
{
|
{
|
||||||
return count($this->runes) + count($this->instants) + count($this->conjures);
|
return count($this->runes) + count($this->instants) + count($this->conjures);
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Wrapper for vocations.xml file.
|
* Wrapper for vocations.xml file.
|
||||||
*
|
*
|
||||||
* @package POT
|
* @package POT
|
||||||
* @version 0.1.3
|
* @version 0.1.3
|
||||||
* @example examples/vocations.php vocations.php
|
* @example examples/vocations.php vocations.php
|
||||||
@ -25,14 +25,14 @@ class OTS_VocationsList implements IteratorAggregate, Countable, ArrayAccess
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* List of vocations.
|
* List of vocations.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
private $vocations = array();
|
private $vocations = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads vocations list from given file.
|
* Loads vocations list from given file.
|
||||||
*
|
*
|
||||||
* @param string $file vocations.xml file location.
|
* @param string $file vocations.xml file location.
|
||||||
* @throws DOMException On DOM operation error.
|
* @throws DOMException On DOM operation error.
|
||||||
*/
|
*/
|
||||||
@ -51,11 +51,11 @@ class OTS_VocationsList implements IteratorAggregate, Countable, ArrayAccess
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Magic PHP5 method.
|
* Magic PHP5 method.
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* Allows object importing from {@link http://www.php.net/manual/en/function.var-export.php var_export()}.
|
* Allows object importing from {@link http://www.php.net/manual/en/function.var-export.php var_export()}.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @param array $properties List of object properties.
|
* @param array $properties List of object properties.
|
||||||
* @throws DOMException On DOM operation error.
|
* @throws DOMException On DOM operation error.
|
||||||
*/
|
*/
|
||||||
@ -74,7 +74,7 @@ class OTS_VocationsList implements IteratorAggregate, Countable, ArrayAccess
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if given vocation ID exists on list.
|
* Checks if given vocation ID exists on list.
|
||||||
*
|
*
|
||||||
* @version 0.1.3
|
* @version 0.1.3
|
||||||
* @since 0.1.3
|
* @since 0.1.3
|
||||||
* @param int $id ID.
|
* @param int $id ID.
|
||||||
@ -87,7 +87,7 @@ class OTS_VocationsList implements IteratorAggregate, Countable, ArrayAccess
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns vocation's ID.
|
* Returns vocation's ID.
|
||||||
*
|
*
|
||||||
* @version 0.1.3
|
* @version 0.1.3
|
||||||
* @param string $name Vocation.
|
* @param string $name Vocation.
|
||||||
* @return int ID.
|
* @return int ID.
|
||||||
@ -108,7 +108,7 @@ class OTS_VocationsList implements IteratorAggregate, Countable, ArrayAccess
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if given vocation name exists on list.
|
* Checks if given vocation name exists on list.
|
||||||
*
|
*
|
||||||
* @version 0.1.3
|
* @version 0.1.3
|
||||||
* @since 0.1.3
|
* @since 0.1.3
|
||||||
* @param string $name Vocation.
|
* @param string $name Vocation.
|
||||||
@ -121,7 +121,7 @@ class OTS_VocationsList implements IteratorAggregate, Countable, ArrayAccess
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns name of given vocation's ID.
|
* Returns name of given vocation's ID.
|
||||||
*
|
*
|
||||||
* @version 0.1.3
|
* @version 0.1.3
|
||||||
* @param int $id Vocation ID.
|
* @param int $id Vocation ID.
|
||||||
* @return string Name.
|
* @return string Name.
|
||||||
@ -139,17 +139,17 @@ class OTS_VocationsList implements IteratorAggregate, Countable, ArrayAccess
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns amount of vocations loaded.
|
* Returns amount of vocations loaded.
|
||||||
*
|
*
|
||||||
* @return int Count of vocations.
|
* @return int Count of vocations.
|
||||||
*/
|
*/
|
||||||
public function count()
|
public function count(): int
|
||||||
{
|
{
|
||||||
return count($this->vocations);
|
return count($this->vocations);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns iterator handle for loops.
|
* Returns iterator handle for loops.
|
||||||
*
|
*
|
||||||
* @return ArrayIterator Vocations list iterator.
|
* @return ArrayIterator Vocations list iterator.
|
||||||
*/
|
*/
|
||||||
public function getIterator()
|
public function getIterator()
|
||||||
@ -159,7 +159,7 @@ class OTS_VocationsList implements IteratorAggregate, Countable, ArrayAccess
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if given element exists.
|
* Checks if given element exists.
|
||||||
*
|
*
|
||||||
* @version 0.1.3
|
* @version 0.1.3
|
||||||
* @param string|int $offset Array key.
|
* @param string|int $offset Array key.
|
||||||
* @return bool True if it's set.
|
* @return bool True if it's set.
|
||||||
@ -178,7 +178,7 @@ class OTS_VocationsList implements IteratorAggregate, Countable, ArrayAccess
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns item from given position.
|
* Returns item from given position.
|
||||||
*
|
*
|
||||||
* @version 0.1.3
|
* @version 0.1.3
|
||||||
* @param string|int $offset Array key.
|
* @param string|int $offset Array key.
|
||||||
* @return string|int If key is an integer (type-sensitive!) then returns vocation name. If it's a string then return associated ID.
|
* @return string|int If key is an integer (type-sensitive!) then returns vocation name. If it's a string then return associated ID.
|
||||||
@ -197,7 +197,7 @@ class OTS_VocationsList implements IteratorAggregate, Countable, ArrayAccess
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This method is implemented for ArrayAccess interface. In fact you can't write/append to vocations list. Any call to this method will cause {@link E_OTS_ReadOnly E_OTS_ReadOnly} raise.
|
* This method is implemented for ArrayAccess interface. In fact you can't write/append to vocations list. Any call to this method will cause {@link E_OTS_ReadOnly E_OTS_ReadOnly} raise.
|
||||||
*
|
*
|
||||||
* @param string|int $offset Array key.
|
* @param string|int $offset Array key.
|
||||||
* @param mixed $value Field value.
|
* @param mixed $value Field value.
|
||||||
* @throws E_OTS_ReadOnly Always - this class is read-only.
|
* @throws E_OTS_ReadOnly Always - this class is read-only.
|
||||||
@ -209,7 +209,7 @@ class OTS_VocationsList implements IteratorAggregate, Countable, ArrayAccess
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This method is implemented for ArrayAccess interface. In fact you can't write/append to vocations list. Any call to this method will cause {@link E_OTS_ReadOnly E_OTS_ReadOnly} raise.
|
* This method is implemented for ArrayAccess interface. In fact you can't write/append to vocations list. Any call to this method will cause {@link E_OTS_ReadOnly E_OTS_ReadOnly} raise.
|
||||||
*
|
*
|
||||||
* @param string|int $offset Array key.
|
* @param string|int $offset Array key.
|
||||||
* @throws E_OTS_ReadOnly Always - this class is read-only.
|
* @throws E_OTS_ReadOnly Always - this class is read-only.
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user