src/Database/AdapterResults.php
private static function makeObject($entity)
    {
        $methodsGet = get_class_methods($entity);
        $methodsGet = array_filter($methodsGet, function($value) {
            return (bool) preg_match('/^get.*$/', $value);
        });
        $std = new \stdClass();
        foreach ($methodsGet as $attribute) {
            $name = str_replace('get', '', $attribute);
            $name = lcfirst($name);
            $std->$name = $entity->$attribute();
        }
        return $std;
    }
private static function makeObject($entity)
    {
        $methodsGet = get_class_methods($entity);
        $methodsGet = array_filter($methodsGet, function($value) {
            return (bool) preg_match('/^get.*$/', $value);
        });
        $std = new \stdClass();
        foreach ($methodsGet as $attribute) {
            $name = str_replace('get', '', $attribute);
            $name = lcfirst($name);
            $std->$name = $entity->$attribute();
        }
        return $std;
    }
private static function makeObject ( $ entity ) { $ methodsGet = get_class_methods ( $ entity ) ; $ methodsGet = array_filter ( $ methodsGet , function ( $ value ) { return ( bool ) preg_match ( '/^get.*$/' , $ value ) ; } ) ; $ std = new \ stdClass ( ) ; foreach ( $ methodsGet as $ attribute ) { $ name = str_replace ( 'get' , '' , $ attribute ) ; $ name = lcfirst ( $ name ) ; $ std -> $ name = $ entity -> $ attribute ( ) ; } return $ std ; }
Extract the attributes of etities

@author Edson B S Monteiro <bruno.monteirodg@gmail.com>
@since 1.0
@param mixed $entity
@return \stdClass
Extract the attributes of etities