library/Garp/Model/Db/Faker.php
public function createFakeRow(array $fieldConfiguration, array $defaultValues = array()) {
        // TODO For now, filter primary keys, assuming they will be auto-generated by the database.
        $exclude = f\either(f\prop('primary'), f\prop_equals('origin', 'relation'));
        $configWithoutPks = f\filter(f\not($exclude), $fieldConfiguration);
        $self = $this;
        return f\reduce(
            function ($out, $field) use ($self) {
                $fieldName = $field['name'];
                if (array_key_exists($fieldName, $out)) {
                    return $out;
                }
                $out[$fieldName] = $self->getFakeValueForField($field);
                return $out;
            },
            $defaultValues,
            $configWithoutPks
        );
    }
public function createFakeRow(array $fieldConfiguration, array $defaultValues = array()) {
        // TODO For now, filter primary keys, assuming they will be auto-generated by the database.
        $exclude = f\either(f\prop('primary'), f\prop_equals('origin', 'relation'));
        $configWithoutPks = f\filter(f\not($exclude), $fieldConfiguration);
        $self = $this;
        return f\reduce(
            function ($out, $field) use ($self) {
                $fieldName = $field['name'];
                if (array_key_exists($fieldName, $out)) {
                    return $out;
                }
                $out[$fieldName] = $self->getFakeValueForField($field);
                return $out;
            },
            $defaultValues,
            $configWithoutPks
        );
    }
public function createFakeRow ( array $ fieldConfiguration , array $ defaultValues = array ( ) ) { // TODO For now, filter primary keys, assuming they will be auto-generated by the database. $ exclude = f \ either ( f \ prop ( 'primary' ) , f \ prop_equals ( 'origin' , 'relation' ) ) ; $ configWithoutPks = f \ filter ( f \ not ( $ exclude ) , $ fieldConfiguration ) ; $ self = $ this ; return f \ reduce ( function ( $ out , $ field ) use ( $ self ) { $ fieldName = $ field [ 'name' ] ; if ( array_key_exists ( $ fieldName , $ out ) ) { return $ out ; } $ out [ $ fieldName ] = $ self -> getFakeValueForField ( $ field ) ; return $ out ; } , $ defaultValues , $ configWithoutPks ) ; }
Create a row with fake values

@param array $fieldConfiguration As taken from Garp_Model_Db::getConfiguration()
@param array $defaultValues      Any values you want to provide yourself
@return array
Create a row with fake values