for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of the sauls/helpers package.
*
* @author Saulius Vaičeliūnas <[email protected]>
* @link http://saulius.vaiceliunas.lt
* @copyright 2018
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sauls\Component\Helper;
use Sauls\Component\Helper\Exception\ClassPropertyNotSetException;
use Sauls\Component\Helper\Exception\PropertyNotAccessibleException;
use Sauls\Component\Helper\Operation\ObjectOperation;
* @throws PropertyNotAccessibleException
function define_object(object $object, array $properties, array $methodPrefixes = ['set', 'add']): object
{
return (new ObjectOperation\DefineObject)->execute($object, $properties, $methodPrefixes);
}
function get_object_property_value(object $object, string $property, array $methodPrefixes = ['get', 'is'])
return (new ObjectOperation\GetPropertyValue)->execute($object, $property, $methodPrefixes);
* @throws ClassPropertyNotSetException
function set_object_property_value(object $object, string $property, $value): void
(new ObjectOperation\SetPropertyValue)->execute($object, $property, $value);