Laravel アノテーションについて質問です。
php
1<?php 2 3namespace Illuminate\Support\Facades; 4 5/** 6 * @method static \Illuminate\Database\ConnectionInterface connection(string $name = null) 7 * @method static string getDefaultConnection() 8 * @method static void setDefaultConnection(string $name) 9 * @method static \Illuminate\Database\Query\Builder table(string $table) 10 * @method static \Illuminate\Database\Query\Expression raw($value) 11 * @method static mixed selectOne(string $query, array $bindings = []) 12 * @method static array select(string $query, array $bindings = []) 13 * @method static bool insert(string $query, array $bindings = []) 14 * @method static int update(string $query, array $bindings = []) 15 * @method static int delete(string $query, array $bindings = []) 16 * @method static bool statement(string $query, array $bindings = []) 17 * @method static int affectingStatement(string $query, array $bindings = []) 18 * @method static bool unprepared(string $query) 19 * @method static array prepareBindings(array $bindings) 20 * @method static mixed transaction(\Closure $callback, int $attempts = 1) 21 * @method static void beginTransaction() 22 * @method static void commit() 23 * @method static void rollBack() 24 * @method static int transactionLevel() 25 * @method static array pretend(\Closure $callback) 26 * 27 * @see \Illuminate\Database\DatabaseManager 28 * @see \Illuminate\Database\Connection 29 */ 30class DB extends Facade 31{ 32 /** 33 * Get the registered name of the component. 34 * 35 * @return string 36 */ 37 protected static function getFacadeAccessor() 38 { 39 return 'db'; 40 } 41} 42
例えば@methodの上から四つ目のアノテーションはBuilderにtabelメソッドを追加していると言うメタ情報を記述しているといった認識で合っていますでしょうか?
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/06/01 06:06