get the doInsert() method code

@return string the doInsert() method code
326747
protected function addDoInsert()
    {
        $table = $this->getTable();
        $script = "
    /**
     * Insert the row in the database.
     *
     * @param      ConnectionInterface \$con
     *
     * @throws PropelException
     * @see doSave()
     */
    protected function doInsert(ConnectionInterface \$con)
    {";
        if ($this->getPlatform() instanceof MssqlPlatform) {
            if ($table->hasAutoIncrementPrimaryKey() ) {
                $script .= "
        \$this->modifiedColumns[" . $this->getColumnConstant($table->getAutoIncrementPrimaryKey()).'] = true;';
            }
            $script .= "
        \$criteria = \$this->buildCriteria();";
            if ($this->getTable()->getIdMethod() != IdMethod::NO_ID_METHOD) {
                $script .= $this->addDoInsertBodyWithIdMethod();
            } else {
                $script .= $this->addDoInsertBodyStandard();
            }
        } else {
            $script .= $this->addDoInsertBodyRaw();
        }
        $script .= "
        \$this->setNew(false);
    }
";

        return $script;
    }
1223178
public function getOrganizationCode()
    {
        if (! $this->_orgCode) {
            $this->_orgCode = $this->currentOrganization->getCode();
            if (! $this->_orgCode) {
                $this->_orgCode = \MUtil_File::cleanupName($this->currentOrganization->getName());
            }

        }

        return $this->_orgCode;
    }
867573
public function getRequestMethod()
    {
        if (isset($this->request->server['http_x_http_method_override'])) {
            return strtoupper($this->request->server['http_x_http_method_override']);
        }
        if (isset($this->request->server['request_method'])) {
            return strtoupper($this->request->server['request_method']);
        }

        return 'GET';
    }
1011045
public static function getMethod() {
    if(null === self::$method) {
      // Make the method upper case.
      self::$method = @strtoupper($_SERVER['REQUEST_METHOD']);

      // A quick-and-dirty test to drop invalid methods.
      if(!self::$method || !ctype_upper(self::$method)) {
        self::$method = '';
      }
    }
    return self::$method;
  }
1261677
protected static function _getCallingMethod()
    {
        $_backTrace = debug_backtrace();

        $_thisClass = get_called_class();
        $_type = $_class = $_method = null;

        for ( $_i = 0, $_size = sizeof( $_backTrace ); $_i < $_size; $_i++ )
        {
            if ( isset( $_backTrace[$_i]['class'] ) )
            {
                $_class = $_backTrace[$_i]['class'];
            }

            if ( $_class == $_thisClass )
            {
                continue;
            }

            if ( isset( $_backTrace[$_i]['method'] ) )
            {
                $_method = $_backTrace[$_i]['method'];
            }
            else if ( isset( $_backTrace[$_i]['function'] ) )
            {
                $_method = $_backTrace[$_i]['function'];
            }
            else
            {
                $_method = 'Unknown';
            }

            $_type = $_backTrace[$_i]['type'];
            break;
        }

        if ( $_i >= 0 )
        {
            return str_ireplace( 'Kisma\\Core\\', 'Core\\', $_class ) . $_type . $_method;
        }

        return 'Unknown';
    }
355694
protected function parseDescription()
    {
        $description = $this->classReflection->getDescription() . chr(10) . chr(10);

        $description .= 'Implemented in: ``' . $this->className . '``' . chr(10) . chr(10);

        $helperName = $this->parseTitle();
        $helperInstance = new $this->className();

        $methods = $this->getHelperMethods();
        foreach ($methods as $methodReflection) {
            if (!$helperInstance instanceof ProtectedContextAwareInterface || $helperInstance->allowsCallOfMethod($methodReflection->getName())) {
                $methodDescription = $this->getMethodDescription($helperName, $methodReflection);
                $description .= trim($methodDescription) . chr(10) . chr(10);
            }
        }

        return $description;
    }
5390
public function getMethod(): string
    {
        if ($this->method === null) {
            $this->method = $this->originalMethod;
            $customMethod = $this->getHeaderLine('X-Http-Method-Override');

            if ($customMethod) {
                $this->method = $this->filterMethod($customMethod);
            } elseif ($this->originalMethod === 'POST') {
                if (($overrideMethod = $this->filterMethod($this->getParsedBodyParam('_METHOD'))) !== null) {
                    $this->method = $overrideMethod;
                }
            }
        }

        return $this->method;
    }
115840
private function addMethodMap()
    {
        if (!$definitions = $this->container->getDefinitions()) {
            return '';
        }

        $code = "        \$this->methodMap = array(\n";
        ksort($definitions);
        foreach ($definitions as $id => $definition) {
            $code .= '            '.$this->export($id).' => '.$this->export($this->generateMethodName($id)).",\n";
        }

        return $code."        );\n";
    }
658061
public static function getRequestMethod()
    {
        // Take the method as found in $_SERVER
        $method = $_SERVER['REQUEST_METHOD'];
        // If it's a HEAD request override it to being GET and prevent any output, as per HTTP Specification
        // @url http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.4
        if ($method === 'HEAD') {
            ob_start();
            $method = 'GET';
        } elseif ($method === 'POST') {
            $headers = self::getRequestHeaders();
            if (isset($headers['X-HTTP-Method-Override']) && in_array($headers['X-HTTP-Method-Override'], ['PUT', 'DELETE', 'PATCH', 'OPTIONS'])) {
                $method = $headers['X-HTTP-Method-Override'];
            } elseif (! empty($_POST['_method'])) {
                $method = strtoupper($_POST['_method']);
            }
        }

        return $method;
    }
585607
public function generateCode()
    {
        $refClass = new ReflectionClass($this->className);
        $this->finalClassesCanNotBeMocked($refClass);

        $this->methods = array();
        $this->makeAllAbstractMethodsThrowException($refClass);
        if (!$this->niceMock || $refClass->isInterface()) {
            $this->makeAllMethodsThrowException($refClass);
        }
        $this->renderRules();
        $this->renderConstructor();
        $this->renderClone();
        $this->exposeMethods();
        $this->setUpGetCallsForMethod();

        $code = $this->getNamespaceCode();
        $methods = implode("\n", $this->methods);
        $superWord = $this->getSuperWord($refClass);

        $class = "class {$this->getMockName()} $superWord \\{$this->className}";
        if ('implements' === $superWord) {
            $class .= ', ';
        } else {
            $class .= ' implements ';
        }
        $class .= '\Concise\Mock\MockInterface';

        return $code .
        "$class { public static \$_methodCalls = array(); $methods }";
    }
1064139
private static function getRequestMethod()
    {
        $method = isset($_SERVER['REQUEST_METHOD'])
            ? strtoupper($_SERVER['REQUEST_METHOD'])
            : 'GET';

        if ('POST' === $method && isset($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'])) {
            $method = strtoupper($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE']);
        }

        return $method;
    }
1123215
public function getCode()
        {
            $ret;

            if($this->count < $this->dataLength) {
                $row = $this->count % $this->blocks;
                $col = $this->count / $this->blocks;
                if($col >= $this->rsblocks[0]->dataLength) {
                    $row += $this->b1;
                }
                $ret = $this->rsblocks[$row]->data[$col];
            } else if($this->count < $this->dataLength + $this->eccLength) {
                $row = ($this->count - $this->dataLength) % $this->blocks;
                $col = ($this->count - $this->dataLength) / $this->blocks;
                $ret = $this->rsblocks[$row]->ecc[$col];
            } else {
                return 0;
            }
            $this->count++;
            
            return $ret;
        }
400542
private MethodCode getDecodeMethodCode() {
        MethodCode mc = new MethodCode();
        mc.setName("decode");
        mc.setScope(ClassCode.SCOPE_PUBLIC);
        mc.setReturnType(ClassHelper.getInternalName(cls.getCanonicalName()));
        mc.addParameter("byte[]", "bb");
        mc.addException("IOException");

        // add method code
        mc.appendLineCode1("CodedInputStream input = CodedInputStream.newInstance(bb, 0, bb.length)");

        getParseBytesMethodCode(mc);

        return mc;
    }
1350050
protected function getApiMethod()
    {
        if (!isset($this->apiMethod)) {
            $words = explode('_', Str::snake(class_basename($this)), -1);
            $endpoint = strtolower(array_shift($words));
            $action = Str::camel(implode('_', $words)) ?: '*';
            $method = sprintf('%s.%s', $endpoint, $action);
            $this->apiMethod = $endpoint ? $method : 'undefined';
        }

        return $this->apiMethod;
    }
261280
protected function _getMethod() {
		$validCharacters = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'q'];
		$validCommands = array_merge($validCharacters, $this->validCommands);

		$command = null;
		while (empty($command)) {
			$this->out('Please type the number or name of the inflection method you would like to use');
			$this->hr();
			$this->out('[1] Pluralize');
			$this->out('[2] Singularize');
			$this->out('[3] Camelize');
			$this->out('[4] Underscore');
			$this->out('[5] Humanize');
			$this->out('[6] Tableize');
			$this->out('[7] Classify');
			$this->out('[8] Variable');
			$this->out('[9] Dasherize');
			$this->out('[10] Slug');
			$this->out('[q] Quit');
			$temp = $this->in('What command would you like to perform?', null, 'q');
			if (in_array(strtolower($temp), $validCommands)) {
				$command = strtolower($temp);
			} else {
				$this->out('Try again.');
			}
		}

		switch ($command) {
			case '1':
			case 'pluralize':
				return 'pluralize';
			case '2':
			case 'singularize':
				return 'singularize';
			case '3':
			case 'camelize':
				return 'camelize';
			case '4':
			case 'underscore':
				return 'underscore';
			case '5':
			case 'humanize':
				return 'humanize';
			case '6':
			case 'tableize':
				return 'tableize';
			case '7':
			case 'classify':
				return 'classify';
			case '8':
			case 'variable':
				return 'variable';
			case '9':
			case 'dasherize':
				return 'dasherize';
			case '10':
			case 'slug':
				return 'slug';
			case 'q':
			case 'quit':
			default:
				$this->out('Exit');
				$this->_stop();
				return null;
		}
	}
95936
public function getMethod()
    {
        if ($this->method === null) {
            $this->method = $this->originalMethod;
            $customMethod = $this->getHeaderLine('X-Http-Method-Override');

            if ($customMethod) {
                $this->method = $this->filterMethod($customMethod);
            } elseif ($this->originalMethod === 'POST') {
                $body = $this->getParsedBody();

                if (is_object($body) && property_exists($body, '_METHOD')) {
                    $this->method = $this->filterMethod($body->_METHOD);
                } elseif (is_array($body) && isset($body['_METHOD'])) {
                    $this->method = $this->filterMethod($body['_METHOD']);
                }

                if ($this->getBody()->eof()) {
                    $this->getBody()->rewind();
                }
            }
        }

        return $this->method;
    }
148627
public function getHttpMethod()
    {
        switch ($this->method) {
            case Method::LINK:
                return Method::POST;
            case Method::UNLINK:
                return Method::DELETE;

            default:
                return $this->method;
        }
    }