Download the PHP package jerodev/diggy without Composer

On this page you can find all versions of the php package jerodev/diggy. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package diggy

Diggy web scraper

PHP tests

Diggy is a simple wrapper around the PHP DOM extension that allow finding elements using simple query selectors and fail proof chaining.

Requirements

Getting started

Diggy includes a simple webclient that uses Guzzle under the hood to download a page and return a NodeCollection object. However, you can use any webclient you prefer and pass a DOMNode or DOMNodeList object to the NodeCollection constructor.

Available functions

These are the available functions on a NodeCollection object. All functions that do not return a native value can be chained without having to worry if there are nodes in the collection or not.

attribute(string $name)

Returns the value of the attribute of the first element in the collection if available.

count()

Returns the number of elements in the current node collection.

each(string $selector, closure $closure, ?int $max = null)

Loops over all dom elements in the current collection and executes a closure for each element. The return value of this function is an array of values returned from the closure.

exists(?string $selector = null)

Indicates if an element exists in the collection. If a selector is given, the current nodes will first be filtered.

filter(closure $closure)

Filters the current node collection based on a given closure.

first(?string $selector = null)

Returns the first element of the node collection. If a selector is given, the current nodes will first be filtered.

is(string $nodeName)

Indicates if the first element in the current collection has a specified tag name.

last(?string $selector = null)

Returns the last element of the node collection. If a selector is given, the current nodes will first be filtered.

nodeName()

Returns the tag name of the first element in the current node collection

nth(int $index, ?string $selector = null)

Returns the nth element of the node collection, starting at 0. If a selector is given, the current nodes will first be filtered.

querySelector(string $selector)

Finds all elements in the current node collection matching this css query selector.

text(?string $selector = null)

Returns the inner text of the first element in the node collection. If a selector is given, the current nodes will first be filtered.

texts()

Returns an array containing the inner text of every root element in the collection.

whereHas(closure $closure)

Filter nodes that contain child nodes that fulfill the filter described by the closure

whereHasAttribute(string $key, ?string $value = null)

Filters the current node collection by the existence of a specific attribute. If a value is given the collection is also filtered by the value of this attribute.

whereHasText(?string $value = null, bool $trim = true, bool $exact = false)

Filters the current node collection by the existence of inner text. Setting a value will also filter the nodes by the actual inner text based on $trim and $exact.

option function
$trim Indicates the inner text value should be trimmed before matches with $value.
$exact Indicates the inner text value should match $value exactly.

xPath(string $selector)

Finds all elements in the current node collection matching this xpath query selector.


All versions of diggy with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-dom Version *
guzzlehttp/guzzle Version ^7.0
symfony/css-selector Version ^6.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package jerodev/diggy contains the following files

Loading the files please wait ....