public static function hydrate(stdClass $customFunction)
    {
        $hydrated = new CustomFunctionEntity();

        if (isset($customFunction->id)) {
            $hydrated->setId($customFunction->id);
        }

        if (isset($customFunction->start_line)) {
            $hydrated->setStartLine($customFunction->start_line);
        }

        if (isset($customFunction->end_line)) {
            $hydrated->setEndLine($customFunction->end_line);
        }

        if (isset($customFunction->start_column)) {
            $hydrated->setStartColumn($customFunction->start_column);
        }

        if (isset($customFunction->end_column)) {
            $hydrated->setEndColumn($customFunction->end_column);
        }

        if (isset($customFunction->name)) {
            $hydrated->setName($customFunction->name);
        }

        if (isset($customFunction->file)) {
            $hydrated->setFile(FileHydrator::hydrate($customFunction->file));
        }

        if (isset($customFunction->class)) {
            $hydrated->setClass(CustomClassHydrator::hydrate($customFunction->class));
        }

        if (isset($customFunction->parameters)) {
            $hydrated->setParameters($customFunction->parameters);
        }

        return $hydrated;
    }
public static function hydrate(stdClass $customFunction)
    {
        $hydrated = new CustomFunctionEntity();

        if (isset($customFunction->id)) {
            $hydrated->setId($customFunction->id);
        }

        if (isset($customFunction->start_line)) {
            $hydrated->setStartLine($customFunction->start_line);
        }

        if (isset($customFunction->end_line)) {
            $hydrated->setEndLine($customFunction->end_line);
        }

        if (isset($customFunction->start_column)) {
            $hydrated->setStartColumn($customFunction->start_column);
        }

        if (isset($customFunction->end_column)) {
            $hydrated->setEndColumn($customFunction->end_column);
        }

        if (isset($customFunction->name)) {
            $hydrated->setName($customFunction->name);
        }

        if (isset($customFunction->file)) {
            $hydrated->setFile(FileHydrator::hydrate($customFunction->file));
        }

        if (isset($customFunction->class)) {
            $hydrated->setClass(CustomClassHydrator::hydrate($customFunction->class));
        }

        if (isset($customFunction->parameters)) {
            $hydrated->setParameters($customFunction->parameters);
        }

        return $hydrated;
    }
public static function hydrate ( stdClass $ customFunction ) { $ hydrated = new CustomFunctionEntity ( ) ; if ( isset ( $ customFunction -> id ) ) { $ hydrated -> setId ( $ customFunction -> id ) ; } if ( isset ( $ customFunction -> start_line ) ) { $ hydrated -> setStartLine ( $ customFunction -> start_line ) ; } if ( isset ( $ customFunction -> end_line ) ) { $ hydrated -> setEndLine ( $ customFunction -> end_line ) ; } if ( isset ( $ customFunction -> start_column ) ) { $ hydrated -> setStartColumn ( $ customFunction -> start_column ) ; } if ( isset ( $ customFunction -> end_column ) ) { $ hydrated -> setEndColumn ( $ customFunction -> end_column ) ; } if ( isset ( $ customFunction -> name ) ) { $ hydrated -> setName ( $ customFunction -> name ) ; } if ( isset ( $ customFunction -> file ) ) { $ hydrated -> setFile ( FileHydrator :: hydrate ( $ customFunction -> file ) ) ; } if ( isset ( $ customFunction -> class ) ) { $ hydrated -> setClass ( CustomClassHydrator :: hydrate ( $ customFunction -> class ) ) ; } if ( isset ( $ customFunction -> parameters ) ) { $ hydrated -> setParameters ( $ customFunction -> parameters ) ; } return $ hydrated ; }
Hydrate a custom-function object into a CustomFunctionEntity object

@param stdClass $customFunction
@return CustomFunctionEntity
Hydrate a custom - function object into a CustomFunctionEntity object