library/Garp/Cli/Command/Snippet.php
protected function _create(array $data) {
        $this->_validateLoadable();
        $snippetModel = new Model_Snippet();
        try {
            $snippetID = $snippetModel->insert($data);
            $snippet = $snippetModel->fetchRow(
                $snippetModel->select()->where('id = ?', $snippetID)
            );
            return $snippet;
        } catch (Garp_Model_Validator_Exception $e) {
            Garp_Cli::errorOut($e->getMessage());
        }
    }
protected function _create(array $data) {
        $this->_validateLoadable();
        $snippetModel = new Model_Snippet();
        try {
            $snippetID = $snippetModel->insert($data);
            $snippet = $snippetModel->fetchRow(
                $snippetModel->select()->where('id = ?', $snippetID)
            );
            return $snippet;
        } catch (Garp_Model_Validator_Exception $e) {
            Garp_Cli::errorOut($e->getMessage());
        }
    }
protected function _create ( array $ data ) { $ this -> _validateLoadable ( ) ; $ snippetModel = new Model_Snippet ( ) ; try { $ snippetID = $ snippetModel -> insert ( $ data ) ; $ snippet = $ snippetModel -> fetchRow ( $ snippetModel -> select ( ) -> where ( 'id = ?' , $ snippetID ) ) ; return $ snippet ; } catch ( Garp_Model_Validator_Exception $ e ) { Garp_Cli :: errorOut ( $ e -> getMessage ( ) ) ; } }
Insert new snippet

@param array $data Snippet data
@return Garp_Db_Table_Row
Insert new snippet