Skip to content

Commit

Permalink
提交代码
Browse files Browse the repository at this point in the history
  • Loading branch information
yunwuxin committed Jul 13, 2016
1 parent e2a5e4e commit e879ec2
Show file tree
Hide file tree
Showing 23 changed files with 1,743 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/vendor/
/thinkphp/
/composer.lock
/.idea/
19 changes: 19 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
language: php

php:
- 5.4
- 5.5
- 5.6
- 7.0
- hhvm

matrix:
allow_failures:
- php: 7.0
- php: hhvm

before_script:
- composer self-update
- composer install --prefer-source --no-interaction --dev

script: phpunit
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# The ThinkPHP5 Image Package

## 安装

> composer require topthink/think-image
## 使用

~~~
$image = \think\image\Image::open('./image.jpg');
或者
$image = \think\image\Image::open(request()->file('image'));
$image->crop(...)
->thumb(...)
->water(...)
->text(....)
->save(..);
~~~
23 changes: 23 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "topthink/think-image",
"description": "The ThinkPHP5 Image Package",
"license": "Apache-2.0",
"authors": [
{
"name": "yunwuxin",
"email": "448901948@qq.com"
}
],
"require": {
"ext-gd": "*"
},
"require-dev": {
"topthink/framework": "dev-master",
"phpunit/phpunit": "^5.4"
},
"autoload": {
"psr-4": {
"think\\image\\": "src"
}
}
}
20 changes: 20 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="tests/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false">
<testsuites>
<testsuite name="Package Test Suite">
<directory suffix=".php">./tests/</directory>
</testsuite>
</testsuites>
<listeners>
<listener class="JohnKary\PHPUnit\Listener\SpeedTrapListener" />
</listeners>
</phpunit>
18 changes: 18 additions & 0 deletions src/Exception.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2015 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: yunwuxin <448901948@qq.com>
// +----------------------------------------------------------------------

namespace think\image;


class Exception extends \RuntimeException
{

}
Loading

0 comments on commit e879ec2

Please sign in to comment.