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