joem/og-query
Composer 安装命令:
composer require joem/og-query
包简介
README 文档
README
OgQuery is a simple, expressive & fluent interface, used to fetch meta from an HTML page.
Usage
Using OgQuery is really simple.
Instantiate the Class:
$Query = new $OgQuery();
Set your target endpoint:
$Query->endpoint('https://joemoses.dev');
Now, select the meta tags you'd like to return:
$Query->meta_tags(['og:title', 'og:image']);
Now, execute the request and get results:
$Query->execute();
It's that simple.
Class Methods
The methods within the OgQuery class are all chain-able, to keep the syntax small and concise.
endpoint(fqdn)
Paramaters
fqdn - String - the fully qualified domain name you wish to target.
Return
$this - Object - Class instance
meta_tags(tags)
Paramaters
tags - Array - An array of meta keys you'd like to fetch - must be either a name or property value.
Return
$this - Object - Class instance
execute()
Paramaters
None.
Return
results - Array - An associative array of found meta data, where the key is the name/property value, and value is content value.
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-10-11