blob: 3b72308a918e4522af9c34c8a4f51fb6c03be103 [file] [log] [blame]
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
#
# Copyright 2012 Oracle and/or its affiliates. All rights reserved.
#
# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
# Other names may be trademarks of their respective owners.
#
# The contents of this file are subject to the terms of either the GNU
# General Public License Version 2 only ("GPL") or the Common
# Development and Distribution License("CDDL") (collectively, the
# "License"). You may not use this file except in compliance with the
# License. You can obtain a copy of the License at
# http://www.netbeans.org/cddl-gplv2.html
# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
# specific language governing permissions and limitations under the
# License. When distributing the software, include this License Header
# Notice in each file and include the License file at
# nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the GPL Version 2 section of the License file that
# accompanied this code. If applicable, add the following below the
# License Header, with the fields enclosed by brackets [] replaced by
# your own identifying information:
# "Portions Copyrighted [year] [name of copyright owner]"
#
# If you wish your version of this file to be governed by only the CDDL
# or only the GPL Version 2, indicate your decision by adding
# "[Contributor] elects to include this software in this distribution
# under the [CDDL or GPL Version 2] license." If you do not indicate a
# single choice of license, a recipient has the option to distribute
# your version of this file under either the CDDL, the GPL Version 2 or
# to extend the choice of license to its licensees as provided above.
# However, if you add GPL Version 2 code and therefore, elected the GPL
# Version 2 license, then the option applies only if the new code is
# made subject to such option by the copyright holder.
#
# Contributor(s):
#
# Portions Copyrighted 2012 Sun Microsystems, Inc.
\n# \u4ece\u63a7\u5236\u5668\u7c7b\u5bfc\u5165\u8def\u7531\npost:\n resource: "@SensioBlogBundle/Controller/PostController.php"\n type: annotation\n</code></pre>\n<p>\u8fd8\u53ef\u4ee5\u5bfc\u5165\u6574\u4e2a\u76ee\u5f55\u3002</p><p style="font-weight: bold; font-size: 1.1em">\u793a\u4f8b</p><pre><code>\n# \u4ece\u63a7\u5236\u5668\u76ee\u5f55\u5bfc\u5165\u8def\u7531\nblog:\n resource: "@SensioBlogBundle/Controller"\n type: annotation\n</code></pre>\n<p>\u5bf9\u4e8e\u4efb\u610f\u5176\u4ed6\u8d44\u6e90, \u53ef\u4ee5\u5c06\u8def\u7531 "\u88c5\u8f7d" \u5728\u7ed9\u5b9a\u524d\u7f00\u4e0b\u3002</p><p style="font-weight: bold; font-size: 1.1em">\u793a\u4f8b</p><pre><code>\npost:\n resource: "@SensioBlogBundle/Controller/PostController.php"\n prefix: /blog\n type: annotation\n</code></pre>\n<p style="font-weight: bold; font-size: 1.1em">\u8def\u7531\u540d\u79f0</p><p>\u4f7f\u7528 <code>@Route</code> \u6807\u6ce8\u5b9a\u4e49\u7684\u8def\u7531\u5c06\u88ab\u8d4b\u4e88\u7531\u5305\u540d\u79f0, \u63a7\u5236\u5668\u540d\u79f0\u548c\u64cd\u4f5c\u540d\u79f0\u7ec4\u6210\u7684\u9ed8\u8ba4\u540d\u79f0\u3002\u4e0a\u4f8b\u4e2d\u7684\u8be5\u540d\u79f0\u5c06\u4e3a <code>sensio_blog_post_index</code>\u3002</p><p><code>name</code> \u5c5e\u6027\u53ef\u7528\u4e8e\u8986\u76d6\u6b64\u9ed8\u8ba4\u8def\u7531\u540d\u79f0\u3002</p><p style="font-weight: bold; font-size: 1.1em">\u793a\u4f8b</p><pre><code>\n/**\n * @Route("/", name="blog_home")\n */\npublic function indexAction() {\n // ...\n}\n</code></pre>\n<p style="font-weight: bold; font-size: 1.1em">\u8def\u7531\u524d\u7f00</p><p>\u63a7\u5236\u5668\u7c7b\u4e0a\u7684 <code>@Route</code> \u6807\u6ce8\u5b9a\u4e49\u6240\u6709\u64cd\u4f5c\u8def\u7531\u7684\u524d\u7f00\u3002</p><p style="font-weight: bold; font-size: 1.1em">\u793a\u4f8b</p><pre><code>\n/**\n * @Route("/blog")\n */\nclass PostController extends Controller {\n /**\n * @Route("/{id}")\n */\n public function showAction($id) {\n }\n}\n</code></pre>\n<p><code>show</code> \u64cd\u4f5c\u73b0\u5728\u6620\u5c04\u5230 <code>/blog/{id}</code> \u6a21\u5f0f\u3002</p>
SymfonyExtraAnnotationsProvider.name=Symfony 2/3 Extra