src/ZF2rapidDomain/Entity/AbstractEntity.php
public function getArrayCopy()
    {
        $data = [];

        foreach (get_object_vars($this) as $key => $value) {
            $getMethod = 'get' . ucfirst($key);

            $arrayKey = StaticFilter::execute($key, 'WordCamelCaseToUnderscore');
            $arrayKey = StaticFilter::execute($arrayKey, 'StringToLower');

            if (method_exists($this, $getMethod)) {
                $data[$arrayKey] = $this->$getMethod();
            }

        }

        return $data;
    }
public function getArrayCopy()
    {
        $data = [];

        foreach (get_object_vars($this) as $key => $value) {
            $getMethod = 'get' . ucfirst($key);

            $arrayKey = StaticFilter::execute($key, 'WordCamelCaseToUnderscore');
            $arrayKey = StaticFilter::execute($arrayKey, 'StringToLower');

            if (method_exists($this, $getMethod)) {
                $data[$arrayKey] = $this->$getMethod();
            }

        }

        return $data;
    }
public function getArrayCopy ( ) { $ data = [ ] ; foreach ( get_object_vars ( $ this ) as $ key => $ value ) { $ getMethod = 'get' . ucfirst ( $ key ) ; $ arrayKey = StaticFilter :: execute ( $ key , 'WordCamelCaseToUnderscore' ) ; $ arrayKey = StaticFilter :: execute ( $ arrayKey , 'StringToLower' ) ; if ( method_exists ( $ this , $ getMethod ) ) { $ data [ $ arrayKey ] = $ this -> $ getMethod ( ) ; } } return $ data ; }
Generate an array copy from property values
Generate an array copy from property values