mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 11:38:44 +02:00
16 lines
303 B
PHP
16 lines
303 B
PHP
<?php
|
|
|
|
namespace Combodo\iTop\Forms\Converter;
|
|
|
|
class OqlToClassName extends AbstractConverter
|
|
{
|
|
|
|
public function Convert(mixed $oData): ?string
|
|
{
|
|
if($oData === null)
|
|
return null;
|
|
// extract selected class
|
|
preg_match('/SELECT\s+(\w+)/', $oData, $aMatches);
|
|
return $aMatches[1] ?? null;
|
|
}
|
|
} |