getChild()->getClassName() . 'Query'; } /** * Set the child object that we're operating on currrently. * @param $child Inheritance */ public function setChild(Inheritance $child) { $this->child = $child; } /** * Returns the child object we're operating on currently. * @return Inheritance * @throws BuildException - if child was not set. */ public function getChild() { if (!$this->child) { throw new BuildException("The PHP5MultiExtendObjectBuilder needs to be told which child class to build (via setChild() method) before it can build the stub class."); } return $this->child; } /** * Adds the include() statements for files that this class depends on or utilizes. * @param string &$script The script will be modified in this method. */ protected function addIncludes(&$script) { $requiredClassFilePath = $this->getStubQueryBuilder()->getClassFilePath(); $script .=" require '".$requiredClassFilePath."'; "; } // addIncludes() /** * Adds class phpdoc comment and openning of class. * @param string &$script The script will be modified in this method. */ protected function addClassOpen(&$script) { $table = $this->getTable(); $tableName = $table->getName(); $tableDesc = $table->getDescription(); $baseBuilder = $this->getNewQueryInheritanceBuilder($this->getChild()); $this->declareClassFromBuilder($baseBuilder); $baseClassname = $baseBuilder->getClassname(); $script .= " /** * Skeleton subclass for representing a query for one of the subclasses of the '$tableName' table. * * $tableDesc *"; if ($this->getBuildProperty('addTimeStamp')) { $now = strftime('%c'); $script .= " * This class was autogenerated by Propel " . $this->getBuildProperty('version') . " on: * * $now *"; } $script .= " * You should add additional methods to this class to meet the * application requirements. This class will only be generated as * long as it does not already exist in the output directory. * * @package propel.generator.".$this->getPackage()." */ class " .$this->getClassname() . " extends " . $baseClassname . " { "; } /** * 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() */ protected function addClassBody(&$script) { } /** * Closes class. * @param string &$script The script will be modified in this method. */ protected function addClassClose(&$script) { $script .= " } // " . $this->getClassname() . " "; } } // MultiExtensionQueryBuilder