General improvements

This commit is contained in:
Bernd Bestel
2017-04-16 23:11:03 +02:00
parent b7852d78d0
commit bd29f5da25
30 changed files with 473 additions and 293 deletions

17
GrocyPhpHelper.php Normal file
View File

@@ -0,0 +1,17 @@
<?php
class GrocyPhpHelper
{
public static function FindObjectInArrayByPropertyValue($array, $propertyName, $propertyValue)
{
foreach($array as $object)
{
if($object->{$propertyName} == $propertyValue)
{
return $object;
}
}
return null;
}
}