PHPackages                             codepso/php-helper - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. codepso/php-helper

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

codepso/php-helper
==================

Help libraries for PHP development

v1.1.0(7y ago)145MITPHP

Since Feb 26Pushed 7y ago2 watchersCompare

[ Source](https://github.com/codepso/php-helper)[ Packagist](https://packagist.org/packages/codepso/php-helper)[ RSS](/packages/codepso-php-helper/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (3)Versions (15)Used By (0)

 [![Codepso](https://camo.githubusercontent.com/7cf61c18038244815b8f8615c88efffa3acffc0b2b93bf3a17ca48d873da90a7/68747470733a2f2f73332e75732d656173742d322e616d617a6f6e6177732e636f6d2f636f646570736f2d636f6d756e6974792f636f646570736f2d6c6f676f2e706e67)](https://camo.githubusercontent.com/7cf61c18038244815b8f8615c88efffa3acffc0b2b93bf3a17ca48d873da90a7/68747470733a2f2f73332e75732d656173742d322e616d617a6f6e6177732e636f6d2f636f646570736f2d636f6d756e6974792f636f646570736f2d6c6f676f2e706e67)
=========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#--)

php-helper
==========

[](#php-helper)

Help libraries for PHP development

Table of content
----------------

[](#table-of-content)

- [Requirements](#requirements)
- [Installation](#installation)
- [Helpers](#mainhelper)
    - [MainHelper](#mainhelper)
    - [ImageHelper](#imagehelper)
    - [JWTHelper](#jwthelper)
- [Tests](#test)
- [License](#license)
- [Links](#links)

Requirements
------------

[](#requirements)

PHP Helper has the following requirements:

- PHP 7.0+ Image manipulation The Imagine Helper has the following requirements:
- Imagine 1.0.1+
- GD

Installation
------------

[](#installation)

```
composer require codepso/php-helper
```

MainHelper
----------

[](#mainhelper)

### `isValid($params, $rules)`

[](#isvalidparams-rules)

### `populate($object, $data, $ignore)`

[](#populateobject-data-ignore)

### `getIgnoredAttributes($object, $attr)`

[](#getignoredattributesobject-attr)

### `getClass($object, $namespace)`

[](#getclassobject-namespace)

### `getElapsed($date)`

[](#getelapseddate)

### `generatePassword($length)`

[](#generatepasswordlength)

### `isJSON($string)`

[](#isjsonstring)

ImageHelper
-----------

[](#imagehelper)

### `createThumbnail($filename, $params)`

[](#createthumbnailfilename-params)

- **$filename**: `string | required` Name of the image
- **$params**: `array | required`
    - **path**: `string | required` Path of the image
    - **filter**: `string | required` Resize info ex: 300x200, 100x100
    - **ratio**: `int | optional` Inset:1 (default), Outbound: 2
    - **rename**: `string | optional` New name of the image

```
