承接 unrealmanu/abstract-walker 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

unrealmanu/abstract-walker

Composer 安装命令:

composer require unrealmanu/abstract-walker

包简介

walker recursive abstract helper

README 文档

README

Manuel Trebbi unrealmanumaster@gmail.com

Walk on the deepest level of object or array with filter by instance and control of deep level

CMD LIST

Launch TEST:

composer test tests

Fix LINT

composer fix tests
composer fix src

Install GIT-HOOK

./scripts/install-hook.bash

USAGE

Extends unrealmanu\Walker\AbstractWalker
example:
  • ./tests/Walk.php

Necessary Method

    abstract function loadChildren(array $parent): array;

    /**
     * @param $parent
     * @return array
     */
    public function walk($parent): array;

    /**
     * @param $parent
     * @return Generator
     */
    public function walkGen($parent): Generator;

METHOD

Define action to get object/array childrens and return this

LoadChidren($parent)

Return array of walked elements

walk($parent) [low performance - easy to use and check]

Return the "raw" generator used for walking in the deepest of elements...

walkGen($parent) [best perfomance]

OPTIONS

unrealmanu\Walker\DTO\WalkOptions (predefined)
unrealmanu\Walker\DTO\WalkOptionsInterface (for future implementation)

true = recursive, false = stop in first depth level

    public function setRecursiveProcessStatus(bool $status = true): bool;

Set Class instance for filter the children in walking process

    public function setFilterInstance(array $class): array;

Set the limit of deepest recursion level

    public function setRecursiveDepthLimit(int $recursiveDepthLimit): void;

Make your custom logic filter for item in recursive processes

    public function itemFilter($item): bool

统计信息

  • 总下载量: 2
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-03-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固