Archives by Tag 'Symfony'
Symfony中获取POST或GET的方法
By Symphony - Last updated: Tuesday, May 20, 2008
public function executeTest() { $hasName = $this->getRequest()->hasParameter(‘name’); $hasName = $this->hasRequestParameter(‘name’); // Shorter version var_dump( $hasName ); $name = $this->getRequest()->getParameter(‘name’); $name = $this->getRequestParameter(‘name’); // Shorter version var_dump( $name ); return sfView::NONE; }
Symfony coding standards(Symfony 代码规范)
By Symphony - Last updated: Sunday, May 18, 2008
In the code examples given in this book, you probably noticed that the opening and closing curly braces ({ and }) occupy one line each. This standard makes the code easier to read. { 和 } 各占一行, 这样的好处是是代码更易于阅读。 Among the other coding standards of the framework, indentation is always done by two blank spaces; tabs [...]