make Settings countable
This commit is contained in:
parent
82346bc36f
commit
942f8a4bde
1 changed files with 12 additions and 1 deletions
|
|
@ -26,7 +26,7 @@ namespace rabe\Util;
|
|||
* Settings Class to read Configuration Files
|
||||
* @author Norbert.e.Wagner dev@norb.me
|
||||
*/
|
||||
class Settings implements \Iterator
|
||||
class Settings implements \Iterator, \Countable
|
||||
{
|
||||
private const SITE = 0x01;
|
||||
|
||||
|
|
@ -314,6 +314,17 @@ class Settings implements \Iterator
|
|||
|
||||
// }}}
|
||||
|
||||
// Countable {{{
|
||||
/**
|
||||
* Count elements
|
||||
* @link https://www.php.net/countable.count.php
|
||||
*/
|
||||
public function count()
|
||||
{
|
||||
count($this->settings);
|
||||
}
|
||||
// }}}
|
||||
|
||||
// Magic getter/setter methods {{{
|
||||
public function __set( $name, $value )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue