protected function addHookMethods(&$script)
    {
        $hooks = [];
        foreach (['pre', 'post'] as $hook) {
            foreach (['Insert', 'Update', 'Save', 'Delete'] as $action) {
                $hooks[$hook.$action] = false === strpos($script, "function $hook.$action(");
            }
        }
        $script .= $this->renderTemplate('baseObjectMethodHook', $hooks);
    }
protected function addHookMethods(&$script)
    {
        $hooks = [];
        foreach (['pre', 'post'] as $hook) {
            foreach (['Insert', 'Update', 'Save', 'Delete'] as $action) {
                $hooks[$hook.$action] = false === strpos($script, "function $hook.$action(");
            }
        }
        $script .= $this->renderTemplate('baseObjectMethodHook', $hooks);
    }
protected function addHookMethods ( & $ script ) { $ hooks = [ ] ; foreach ( [ 'pre' , 'post' ] as $ hook ) { foreach ( [ 'Insert' , 'Update' , 'Save' , 'Delete' ] as $ action ) { $ hooks [ $ hook . $ action ] = false === strpos ( $ script , "function $hook.$action(" ) ; } } $ script .= $ this -> renderTemplate ( 'baseObjectMethodHook' , $ hooks ) ; }
Adds the base object hook functions.

@param string &$script
Adds the base object hook functions .