This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // @see https://github.com/cgmartin/ZF2FileUploadExamples/blob/master/src/ZF2FileUploadExamples/Form/SingleUpload.php | |
| $inputFilter = new InputFilter\InputFilter(); | |
| $file = array( | |
| 'type' => 'Zend\InputFilter\FileInput', | |
| 'name' => 'file', | |
| 'required' => FALSE, | |
| 'filters' => array( | |
| array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| return array( | |
| // Zend_I18n_Validator_Alnum | |
| "Invalid type given. String, integer or float expected" => "不正な形式です。文字列、整数、もしくは小数が期待されています", | |
| "The input contains characters which are non alphabetic and no digits" => "入力値にアルファベットと数字以外の文字が含まれています", | |
| "The input is an empty string" => "入力値は空の文字列です", | |
| // Zend_I18n_Validator_Alpha | |
| "Invalid type given. String expected" => "不正な形式です。文字列が期待されています", | |
| "The input contains non alphabetic characters" => "入力値にアルファベット以外の文字が含まれています", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env php | |
| <?php | |
| /** | |
| * Zend Framework (http://framework.zend.com/) | |
| * | |
| * @link http://github.com/zendframework/zf2 for the canonical source repository | |
| * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) | |
| * @license http://framework.zend.com/license/new-bsd New BSD License | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $en = include __DIR__.'/resources/languages/en/Zend_Validate.php'; | |
| $old_ja = include __DIR__.'/resources/languages/ja/Zend_Validate.php'; | |
| $new_ja = array(); | |
| $not_new_ja = $old_ja; | |
| foreach ($en as $key => $message) { | |
| $new_ja[$key] = isset($old_ja[$key]) ? $old_ja[$key] : $message; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "require": { | |
| "fabpot/goutte": "dev-master", | |
| "diggin/diggin-http-charset": "dev-master", | |
| "diggin/diggin-bridge-guzzle-autocharsetencodingplugin": "dev-master" | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <title>Upload test</title> | |
| </head> | |
| <body> | |
| <h2>Test form for CakePHP style multi dimentional field</h2> | |
| <form name="file-form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" enctype="multipart/form-data"> | |
| <label for="file">Choose Filen:</label> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/src/Diggin/Http/Charset/Detector/HtmlDetector.php b/src/Diggin/Http/Charset/Detector/HtmlDetector.ph | |
| index 4ed6dbd..ee1b543 100644 | |
| --- a/src/Diggin/Http/Charset/Detector/HtmlDetector.php | |
| +++ b/src/Diggin/Http/Charset/Detector/HtmlDetector.php | |
| @@ -36,7 +36,11 @@ class HtmlDetector | |
| private $_config = array('accept_header_ctype' => true, | |
| 'force_detect_body' => false, | |
| - 'detect_prefer_mime' => false); | |
| + 'detect_prefer_mime' => false, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| use Zend\Loader\StandardAutoloader; | |
| use Zend\Code\Scanner\DirectoryScanner; | |
| use Zend\Code\Reflection\FileReflection; | |
| require_once __DIR__.'/library/Zend/Loader/StandardAutoloader.php'; | |
| $dir = __DIR__.'/library/Zend/Validator'; | |
| $autoloader = new StandardAutoloader(array('autoregister_zf' => true)); | |
| $autoloader->register(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "repositories": [ | |
| { | |
| "type": "composer", | |
| "url": "http://packages.zendframework.com/" | |
| } | |
| ], | |
| "require": { | |
| "php": ">=5.3.3", | |
| "zendframework/zend-stdlib": ">=2.0.0beta5", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| use Imagine\Image\Box, | |
| Imagine\Image\Color, | |
| Imagine\Image\Point; | |
| //$path = 'tests/Imagine/Fixtures/font/Arial.ttf'; | |
| $path = ($argv[1]) ? $argv[1] : die; | |
| $black = new Color('000'); | |
| $text = "わーいうすしお\nあかリ うすしお\nだいすきー"; |