Automation ini...
This commit is contained in:
parent
13ed3973b7
commit
c33825df91
@ -15,12 +15,12 @@ class UserController extends AdminController
|
|||||||
$this->_model = new UserModel();
|
$this->_model = new UserModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function index()
|
public function index(): string
|
||||||
{
|
{
|
||||||
return __METHOD__;
|
return __METHOD__;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function point()
|
public function point(): string
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$id = $this->request->getPost('id');
|
$id = $this->request->getPost('id');
|
||||||
|
|||||||
@ -32,7 +32,7 @@ class MyCrawlerLibrary
|
|||||||
public function getLinks(Crawler $crawler, array $options = ["tag" => "a", "attr" => "href"]): array
|
public function getLinks(Crawler $crawler, array $options = ["tag" => "a", "attr" => "href"]): array
|
||||||
{
|
{
|
||||||
$links = $crawler->filter($options["tag"])->each(
|
$links = $crawler->filter($options["tag"])->each(
|
||||||
function (Crawler $node) use (&$options) {
|
function (Crawler $node) use (&$options): array {
|
||||||
return [
|
return [
|
||||||
"anchor" => $node->text(),
|
"anchor" => $node->text(),
|
||||||
"href" => $node->attr($options["attr"])
|
"href" => $node->attr($options["attr"])
|
||||||
@ -48,7 +48,7 @@ class MyCrawlerLibrary
|
|||||||
public function getImages(Crawler $crawler, array $options = ["tag" => "img", "attr" => "src"]): array
|
public function getImages(Crawler $crawler, array $options = ["tag" => "img", "attr" => "src"]): array
|
||||||
{
|
{
|
||||||
$images = $crawler->filter($options["tag"])->each(
|
$images = $crawler->filter($options["tag"])->each(
|
||||||
function (Crawler $node) use (&$options) {
|
function (Crawler $node) use (&$options): array {
|
||||||
return [
|
return [
|
||||||
"alt" => $node->attr('alt'),
|
"alt" => $node->attr('alt'),
|
||||||
"src" => $node->attr($options["attr"])
|
"src" => $node->attr($options["attr"])
|
||||||
@ -64,7 +64,7 @@ class MyCrawlerLibrary
|
|||||||
public function getVideos(Crawler $crawler, array $options = ["tag" => "video", "attr" => "src"]): array
|
public function getVideos(Crawler $crawler, array $options = ["tag" => "video", "attr" => "src"]): array
|
||||||
{
|
{
|
||||||
$videos = $crawler->filter($options["tag"])->each(
|
$videos = $crawler->filter($options["tag"])->each(
|
||||||
function (Crawler $node) use (&$options) {
|
function (Crawler $node) use (&$options): array {
|
||||||
return [
|
return [
|
||||||
"alt" => $node->attr('alt'),
|
"alt" => $node->attr('alt'),
|
||||||
"src" => $node->attr($options["attr"])
|
"src" => $node->attr($options["attr"])
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user