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 | |
| /** | |
| * transfrom text to array with unique words and their appearance count | |
| * | |
| * @param string text | |
| * @param array excludes | |
| * @param string sort prefix php sort function, by default alphabetic | |
| * @return array the words as keys and the appearance count as value | |
| */ | |
| function word_count($text, $excludes=array(), $sort = 'k') |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <project name="FooBar" default="dist"> | |
| <copy todir="c:\FooBarStage\vendor\swiftmailer"> | |
| <fileset dir=".\vendor\swiftmailer"> | |
| <exclude name=".git\**" /> <!-- exclude .git directory files because they can be locked --> | |
| <exclude name=".gitignore" /> | |
| <exclude name="CHANGES" /> | |
| <exclude name="README" /> | |
| <exclude name="README.git" /> |
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 | |
| /** | |
| * Throw Kohana exception if json function returns nothing | |
| * | |
| * @example | |
| * $en = json_encode("\xB1\x31"); | |
| * | |
| * check_json_error($en); | |
| * | |
| * $de = json_decode("{'Organization': 'Kohana'}"); |
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
| function one_not_empty($array,$fields) | |
| { | |
| $fields = func_get_args(); | |
| array_shift($fields); | |
| foreach($fields as $field) | |
| { | |
| if(Valid::not_empty($array[$field])) | |
| { | |
| return true; |
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 defined('SYSPATH') or die('No direct script access.'); | |
| class HTML extends Kohana_HTML{ | |
| /** | |
| * Process image before creating tag | |
| * | |
| * @param string $file master file | |
| * @param string $processed_file file to display | |
| * @param array $attributes with extra processing attributes | |
| * @param type $index |
NewerOlder