OpenXE/classes/Components/I18n/Dataaccess/CountableTrait.php
Roland Rusch 6695369af7 RETROTEC-AG/OpenXE#17 Locale des GUI-Users ermitteln
Füge Copyright-Hinweise hinzu.
2023-08-14 15:10:34 +02:00

31 lines
702 B
PHP

<?php
/*
* SPDX-FileCopyrightText: 2023 Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
* SPDX-License-Identifier: AGPL-3.0-only
*/
declare(strict_types=1);
namespace Xentral\Components\I18n\Dataaccess;
/**
* Provides countable functions to the data provider.
*
* @see \Countable
* @see DataProvider
* @see DataProviderInterface
* @author Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
*/
trait CountableTrait
{
/**
* Counts the number of records in the private $data array.
*
* @return int Number of records
*/
public function count(): int
{
return count($this->DataProvider_DATA);
}
}