mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-27 07:44:05 +02:00
ipl\Html: implement Countable
This commit is contained in:
parent
098cd0a57a
commit
51f5b6ad92
15
library/vendor/ipl/Html/Html.php
vendored
15
library/vendor/ipl/Html/Html.php
vendored
@ -2,10 +2,15 @@
|
|||||||
|
|
||||||
namespace ipl\Html;
|
namespace ipl\Html;
|
||||||
|
|
||||||
|
use Countable;
|
||||||
use Exception;
|
use Exception;
|
||||||
use Icinga\Exception\ProgrammingError;
|
use Icinga\Exception\ProgrammingError;
|
||||||
|
|
||||||
class Html implements ValidHtml
|
/**
|
||||||
|
* Class Html
|
||||||
|
* @package ipl\Html
|
||||||
|
*/
|
||||||
|
class Html implements ValidHtml, Countable
|
||||||
{
|
{
|
||||||
protected $contentSeparator = '';
|
protected $contentSeparator = '';
|
||||||
|
|
||||||
@ -134,6 +139,14 @@ class Html implements ValidHtml
|
|||||||
return ! empty($this->content);
|
return ! empty($this->content);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
public function count()
|
||||||
|
{
|
||||||
|
return count($this->content);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $separator
|
* @param $separator
|
||||||
* @return self
|
* @return self
|
||||||
|
Loading…
x
Reference in New Issue
Block a user