这是indexloc提供的服务,不要输入任何密码
Skip to content

ampproject/px-toolbox-php

Repository files navigation

Page Experience Toolbox for PHP

Tooling to get the best possible page experience results out of your PHP-powered web properties.
Explore the docs »

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License

About The Project

The Page Experience Toolbox for PHP regroups tooling and library code that enables you to maximize your page experience results for any PHP-powered web properties.

Currently included in the toolbox:

%%{init: {'theme': 'neutral'}}%%
graph
    subgraph PXT[PX Toolbox]

        PSI[<strong>PageSpeed Insights API Client</strong><br><br>API wrapper for PHP to run audits through<br>the Google PageSpeed Insights API]
        PXE[<strong>Page Experience Engine</strong><br><br>Higher-level library that aggregates and<br>normalizes multiple tools to provide<br>analysis and optimization functionality]
        PX[<strong>PX CLI Tool</strong><br><br>Console <code>px</code> binary to run the<br>PX Toolbox tools through the CLI]

        PX --provides CLI interface for--> PSI
        PX --provides CLI interface for--> PXE
        PSI --powers audits in--> PXE
    end

classDef package fill:#005af0,stroke:#002080,stroke-width:1px,color:#fff;
class PX,PXE,PSI package;

click PX "https://github.com/ampproject/px-toolbox-php/tree/main/docs/px/README.md#readme" "Documentation for the PX CLI Tool"
click PSI "https://github.com/ampproject/px-toolbox-php/tree/main/docs/psi/README.md#readme" "Documentation for the PageSpeed Insights API Client"
click PXE "https://github.com/ampproject/px-toolbox-php/tree/main/docs/pxe/README.md#readme" "Documentation for the Page Experience Engine"
Loading

(back to top)

Getting Started

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

Prerequisites

The following requirements need to be fulfilled by your PHP installation to make use of the toolbox:

  • PHP 5.6+
  • Active PHP extensions:
    • curl
    • json
    • zip
  • Remote connectivity for API requests against the Google PageSpeed Insights API

Installation

The toolbox can be pulled into your project via Composer:

composer require ampproject/px-toolbox

In case you're only interested in making use of the px binary without integrating the library code into an existing project, you can also install the toolbox as a global Composer package:

composer global require ampproject/px-toolbox

(back to top)

Usage

Use this space to show useful examples of how a project can be used. Additional screenshots, code examples and demos work well in this space. You may also link to more resources.

For more examples, please refer to the Documentation

(back to top)

Roadmap

The project is currently in its very early stages, with the main focus lying on making the main functionality work as expected.

The initial end-user integration this library is being coded against is the PX Plugin for WordPress.

%%{init: {'theme': 'neutral'}}%%
graph
    subgraph pxwp[px-wp]
        rest[REST API]
        devtools[Developer Tools]

        devtools -.-> rest
    end

    subgraph pxtb[px-toolbox-php]
        pxe[PX Engine]
    end

    subgraph amptb[amp-toolbox-php]
        sanitizer[Sanitizer]
        validator[Validator]
        optimizer[Optimizer]
        linter[Linter]
        spec[AMP Spec]

        sanitizer -.-> spec
        validator -.-> spec
        optimizer -.-> spec
    end

    pxe -.-> sanitizer
    pxe -.-> validator
    pxe -.-> optimizer
    pxe -.-> linter

    rest -.-> pxe
    devtools -.-> pxe

classDef cplugin fill:#33aa00,stroke:#002080,stroke-width:1px,color:#fff;
classDef cpx fill:#9955f0,stroke:#002080,stroke-width:1px,color:#fff;
classDef camp fill:#005af0,stroke:#002080,stroke-width:1px,color:#fff;
class rest,devtools cplugin;
class pxe,psi cpx;
class sanitizer,validator,optimizer,linter,spec camp;
Loading

The roadmap will be further fleshed out as we approach the first feature-complete release.

(back to top)

Contributing

Please see the CONTRIBUTING file for information on contributing to the Page Experience Toolbox for PHP.

(back to top)

License

The PHP Page Experience Toolbox is licensed under the Apache License, Version 2.0.

(back to top)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages