| @@ 158-172 (lines=15) @@ | ||
| 155 | * @param $str |
|
| 156 | * @return array |
|
| 157 | */ |
|
| 158 | public function splitContent($str) { |
|
| 159 | $maxlength = 2621440; // 5 Megs (2 bytes per character) |
|
| 160 | $count = 0; |
|
| 161 | $strarray = array(); |
|
| 162 | while (true) { |
|
| 163 | if (strlen($str) <= $maxlength) { |
|
| 164 | $strarray[$count++] = $str; |
|
| 165 | return $strarray; |
|
| 166 | } else { |
|
| 167 | $strarray[$count++] = substr($str, 0, $maxlength); |
|
| 168 | $str = substr($str, $maxlength); |
|
| 169 | } |
|
| 170 | } |
|
| 171 | return $strarray; |
|
| 172 | } |
|
| 173 | ||
| 174 | /** |
|
| 175 | * Returns a user's owned and shared notes |
|
| @@ 58-72 (lines=15) @@ | ||
| 55 | * @param $str |
|
| 56 | * @return array |
|
| 57 | */ |
|
| 58 | public function splitContent($str) { |
|
| 59 | $maxlength = 2621440; // 5 Megs (2 bytes per character) |
|
| 60 | $count = 0; |
|
| 61 | $strarray = array(); |
|
| 62 | while (true) { |
|
| 63 | if (strlen($str) <= $maxlength) { |
|
| 64 | $strarray[$count++] = $str; |
|
| 65 | return $strarray; |
|
| 66 | } else { |
|
| 67 | $strarray[$count++] = substr($str, 0, $maxlength); |
|
| 68 | $str = substr($str, $maxlength); |
|
| 69 | } |
|
| 70 | } |
|
| 71 | return $strarray; |
|
| 72 | } |
|
| 73 | ||
| 74 | /** |
|
| 75 | * @param $filetime \DateTime |
|