Specifies the methods that are added as part of the stub object class.

By default there are no methods for the empty stub classes; override this method
if you want to change that behavior.

@see        ObjectBuilder::addClassBody()
960329
protected function addClassBody(&$script)
    {
        // namespaces
        $this->declareClasses('ModelCriteria', 'Criteria', 'ModelJoin', 'Exception');
        $this->declareClassFromBuilder($this->getStubQueryBuilder());
        $this->declareClassFromBuilder($this->getStubPeerBuilder());

        // apply behaviors
        $this->applyBehaviorModifier('queryAttributes', $script, "	");
        $this->addConstructor($script);
        $this->addFactory($script);
        $this->addFindPk($script);
        $this->addFindOneByPk($script);
        $this->addFindPkSimple($script);
        $this->addFindPkComplex($script);
        $this->addFindPks($script);
        $this->addFilterByPrimaryKey($script);
        $this->addFilterByPrimaryKeys($script);
        foreach ($this->getTable()->getColumns() as $col) {
            $this->addFilterByCol($script, $col);
            if ($col->getType() === PropelTypes::PHP_ARRAY && $col->isNamePlural()) {
                $this->addFilterByArrayCol($script, $col);
            }
        }
        foreach ($this->getTable()->getForeignKeys() as $fk) {
            $this->addFilterByFK($script, $fk);
            $this->addJoinFk($script, $fk);
            $this->addUseFKQuery($script, $fk);
        }
        foreach ($this->getTable()->getReferrers() as $refFK) {
            $this->addFilterByRefFK($script, $refFK);
            $this->addJoinRefFk($script, $refFK);
            $this->addUseRefFKQuery($script, $refFK);
        }
        foreach ($this->getTable()->getCrossFks() as $fkList) {
            list($refFK, $crossFK) = $fkList;
            $this->addFilterByCrossFK($script, $refFK, $crossFK);
        }
        $this->addPrune($script);
        $this->addBasePreSelect($script);
        $this->addBasePreDelete($script);
        $this->addBasePostDelete($script);
        $this->addBasePreUpdate($script);
        $this->addBasePostUpdate($script);
        // apply behaviors
        $this->applyBehaviorModifier('queryMethods', $script, "	");
    }
1334235
public function setBody($body = null)
    {
        if (is_object($body)) {
            $body = (string) $body;
        }

        $this->data['body'] = $body;
        return $this;
    }
99453
public function addClass($classname)
    {
        $classArr = $this->getClassArray();
        $classArr[] = $classname;
        return $this->setClassArray($classArr);
    }
790047
public function addClass($className)
    {
        $existingClasses = !empty($this->attributes['class'])
            ? explode(' ',$this->attributes['class'])
            : array();
        $existingClasses[] = $className;
        $this->attributes['class'] = implode(' ', array_unique($existingClasses));
    }
604630
public function addClass( $className, $parameters = array() )
	{
		$object	= Alg_Object_Factory::createObject( $className, $parameters );
		$this->addObject( $object );
	}
1139028
public function addClassMap(string $classname, ?string $newClassname = null, string $shortName = '', int $instanceId = 0): void
    {
        if ($newClassname === null) {
            $newClassname = $classname;
        }
        $this->addCallableMap($classname, function (Container $container) use ($newClassname) {
            return new $newClassname();
        }, $shortName, $instanceId);
    }
847597
function addSelfAndBaseBody(body, SELF, method) {
        body.__SELF = SELF;
        if (method && method.__BASE_META) {
            body.__BASE_BODY = method.__BASE_META.body.value;
        }

        return body;
    }
960734
public function add($method)
    {
        if (!$method instanceof MethodInterface) {
            throw new \InvalidArgumentException('This Method must be a instance of \ClassGeneration\MethodInterface');
        }
        if ($method->getName() === null) {
            $method->setName('method' . ($this->count() + 1));
        }

        parent::set($method->getName(), $method);
        return true;
    }
874892
public function setBody($body)
    {
        $this->code = array(new CodeLineGenerator($body, $this->getIndentationLevel(), $this->getIndentationString()));

        return $this;
    }
716772
public function add_model($class, $instance = null, $method = 'set_form_fields')
	{
		$this->fieldset->add_model($class, $instance, $method);

		return $this;
	}
1107215
public function add($value)
    {
        if (!$value instanceof EmailBodyPart) {
            throw new InvalidArgumentException(
                sprintf(
                    '%s only accepts instances of %s.',
                    __FUNCTION__, EmailBodyPart::class
                )
            );
        }

        return parent::add($value);
    }
262608
public function addObject( $object )
	{
		if( !is_object( $object ) )
			throw new InvalidArgumentException( 'Not an object given' );
		$reflection	= new ReflectionObject( $object );
		$methods	= $reflection->getMethods();
		foreach( $methods as $method )
		{
			if( in_array( $method->name, $this->delegableMethods ) )
				throw new RuntimeException( 'Method "'.$method->name.'" is already set' );
			$this->delegableMethods[]	= $method->name;
		}
		$this->delegableObjects[]	= $object;
	}
101596
public function addMethod(&$method)
    {
        if (isset($this->_methods[$method->name()])) {
            $phpdoctor =& $this->_root->phpdoctor();
            echo "\n";
            $phpdoctor->warning('Found method '.$method->name().' again, overwriting previous version');
        }
        $this->_methods[$method->name()] =& $method;
    }
721097
protected function replaceClassName(&$stub)
    {
        $className = ucwords(camel_case($this->argumentName()));

        $stub = str_replace('{{class}}', $className, $stub);

        return $this;
    }
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";
    }
117354
public function addClass($class, $extends = null, $implements = [])
    {
        $classId = $this->registerClass($class);
        if ($extends) {
            $parentClassId = $this->registerClass($extends);
            $this->extends[$classId] = [$parentClassId];
        }
        if (!empty($implements)) {
            $interfaceIds = [];
            foreach ($implements as $interface) {
                $interfaceIds[] = $this->registerInterface($interface);
            }
            $this->implements[$classId] = $interfaceIds;
        }
    }
68964
public function decorate($mock, array $stubs): void
    {
        $this->checkMockType($mock);

        $stubs = buildStubs($stubs);

        foreach ($stubs as $stub) {
            if ($stub instanceof PropertyStub) {
                $this->doDecorateWithProperty($mock, $stub);
            }

            if ($stub instanceof MethodStub) {
                $this->doDecorateWithMethod($mock, $stub);
            }
        }
    }