<commit_before><?php
namespace Example4;

require_once '_inc/autoloader.php';

use Kir\Data\ArrayObjectConverter;
use Kir\Data\ArrayObjectConverter\Filtering\Filter\Func;
use Kir\Data\ArrayObjectConverter\DefinitionProvider\Property\Annotation\Options;

class Entity {
	/**
	 * @var int
	 * @aoc-array-key id
	 * @aoc-getter-filter test param1="\"String\"", param2=true, param3=false, param4=null, param5=123, param6=123.45
	 */
	public $id = 1234;

	/**
	 * @return int
	 */
	public function getId() {
		return $this->id;
	}
}

/**
 */
class LocalArrayObjectConverter extends ArrayObjectConverter {
	/**
	 * @param object $object
	 */
	public function __construct($object) {
		parent::__construct($object);

		$this->getterHandler()->filters()->add('test', new Func(function ($value, Options $options) {
			var_dump($value);
			var_dump($options->getAll());
		}));
	}
}

$entity = new Entity();
$converter = new LocalArrayObjectConverter($entity);
$data = $converter->getArray();
print_r($data);<commit_msg>Some clean up<commit_after><?php
namespace Example4;

require_once '_inc/autoloader.php';

use Kir\Data\ArrayObjectConverter;
use Kir\Data\ArrayObjectConverter\Filtering\Filter\Func;
use Kir\Data\ArrayObjectConverter\DefinitionProvider\Property\Annotation\Options;

class Entity {
	/**
	 * @var int
	 * @aoc-array-key id
	 * @aoc-getter-filter test param1="\"String\"", param2=true, param3=false, param4=null, param5=123, param6=123.45
	 */
	public $id = 1234;

	/**
	 * @return int
	 */
	public function getId() {
		return $this->id;
	}
}

/**
 */
class LocalArrayObjectConverter extends ArrayObjectConverter {
	/**
	 * @param object $object
	 */
	public function __construct($object) {
		parent::__construct($object);

		$this->getterHandler()->filters()->add('test', new Func(function ($value, Options $options) {
			var_dump($value);
			print_r($options->getAll());
		}));
	}
}

$entity = new Entity();
$converter = new LocalArrayObjectConverter($entity);
$data = $converter->getArray();
print_r($data);
{'fraction_non_alphanumeric': 0.16575682382133994, 'fraction_numerical': 0.018858560794044667, 'mean_word_length': 4.843478260869565, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1397594', 'n_tokens_mistral': 709, 'n_tokens_neox': 658, 'n_words': 127}