@@ -34,6 +34,9 @@ discard block |
||
| 34 | 34 | return $this->_model; |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | + /** |
|
| 38 | + * @param Ajde_Model $model |
|
| 39 | + */ |
|
| 37 | 40 | public function setModel($model) |
| 38 | 41 | { |
| 39 | 42 | $this->_model = $model; |
@@ -84,6 +87,9 @@ discard block |
||
| 84 | 87 | return $this->_value; |
| 85 | 88 | } |
| 86 | 89 | |
| 90 | + /** |
|
| 91 | + * @param string|null $value |
|
| 92 | + */ |
|
| 87 | 93 | public function validate($fieldOptions, $value) |
| 88 | 94 | { |
| 89 | 95 | $this->_value = $value; |
@@ -27,6 +27,9 @@ discard block |
||
| 27 | 27 | $this->_url = $url; |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | + /** |
|
| 31 | + * @return string |
|
| 32 | + */ |
|
| 30 | 33 | public function getTitle() |
| 31 | 34 | { |
| 32 | 35 | return $this->_title; |
@@ -42,6 +45,9 @@ discard block |
||
| 42 | 45 | return $this->_message; |
| 43 | 46 | } |
| 44 | 47 | |
| 48 | + /** |
|
| 49 | + * @return string |
|
| 50 | + */ |
|
| 45 | 51 | public function getUrl() |
| 46 | 52 | { |
| 47 | 53 | return $this->_url; |
@@ -24,6 +24,9 @@ discard block |
||
| 24 | 24 | return $this->get('type'); |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | + /** |
|
| 28 | + * @param integer $position |
|
| 29 | + */ |
|
| 27 | 30 | public function setPosition($position) |
| 28 | 31 | { |
| 29 | 32 | $this->set('position', $position); |
@@ -64,6 +67,9 @@ discard block |
||
| 64 | 67 | return false; |
| 65 | 68 | } |
| 66 | 69 | |
| 70 | + /** |
|
| 71 | + * @param string $filename |
|
| 72 | + */ |
|
| 67 | 73 | protected static function exist($filename) |
| 68 | 74 | { |
| 69 | 75 | if (is_file($filename)) { |
@@ -89,6 +95,9 @@ discard block |
||
| 89 | 95 | return base64_decode($string); |
| 90 | 96 | } |
| 91 | 97 | |
| 98 | + /** |
|
| 99 | + * @param string $string |
|
| 100 | + */ |
|
| 92 | 101 | public static function _urlEncode($string) |
| 93 | 102 | { |
| 94 | 103 | // return self::_rotUrl($string); |
@@ -27,6 +27,9 @@ discard block |
||
| 27 | 27 | $this->_type = $this->extension(); |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | + /** |
|
| 31 | + * @param integer $width |
|
| 32 | + */ |
|
| 30 | 33 | public function getUrl($width = null, $height = null, $crop = false) |
| 31 | 34 | { |
| 32 | 35 | $this->setWidth($width); |
@@ -169,6 +172,9 @@ discard block |
||
| 169 | 172 | return $this->getGeneratedFilename(); |
| 170 | 173 | } |
| 171 | 174 | |
| 175 | + /** |
|
| 176 | + * @param boolean $crop |
|
| 177 | + */ |
|
| 172 | 178 | public function getGeneratedFilename($width = null, $height = null, $crop = null) |
| 173 | 179 | { |
| 174 | 180 | if ( |
@@ -311,6 +317,9 @@ discard block |
||
| 311 | 317 | return $this->resize($height, $width, true); |
| 312 | 318 | } |
| 313 | 319 | |
| 320 | + /** |
|
| 321 | + * @param string $target |
|
| 322 | + */ |
|
| 314 | 323 | public function save($target) |
| 315 | 324 | { |
| 316 | 325 | switch ($this->_type) { |
@@ -374,6 +383,14 @@ discard block |
||
| 374 | 383 | return $path_info['filename']; |
| 375 | 384 | } |
| 376 | 385 | |
| 386 | + /** |
|
| 387 | + * @param resource $dst_image |
|
| 388 | + * @param resource|null $src_image |
|
| 389 | + * @param integer $dst_x |
|
| 390 | + * @param integer $dst_y |
|
| 391 | + * @param integer $src_x |
|
| 392 | + * @param integer $src_y |
|
| 393 | + */ |
|
| 377 | 394 | protected function fastimagecopyresampled( |
| 378 | 395 | &$dst_image, |
| 379 | 396 | $src_image, |
@@ -79,6 +79,9 @@ discard block |
||
| 79 | 79 | return $this->get('arguments'); |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | + /** |
|
| 83 | + * @param string $filename |
|
| 84 | + */ |
|
| 82 | 85 | protected static function exist($filename) |
| 83 | 86 | { |
| 84 | 87 | if (is_file($filename)) { |
@@ -131,6 +134,12 @@ discard block |
||
| 131 | 134 | return $this->_filename; |
| 132 | 135 | } |
| 133 | 136 | |
| 137 | + /** |
|
| 138 | + * @param string $base |
|
| 139 | + * @param string $type |
|
| 140 | + * @param string $action |
|
| 141 | + * @param string $format |
|
| 142 | + */ |
|
| 134 | 143 | public static function getFilenameFromStatic($base, $type, $action, $format) |
| 135 | 144 | { |
| 136 | 145 | return self::_getFilename($base, $type, $action, $format); |
@@ -51,6 +51,9 @@ |
||
| 51 | 51 | return $this->get('base'); |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | + /** |
|
| 55 | + * @param string $base |
|
| 56 | + */ |
|
| 54 | 57 | public function setBase($base) |
| 55 | 58 | { |
| 56 | 59 | $this->set('base', $base); |
@@ -280,6 +280,9 @@ discard block |
||
| 280 | 280 | |
| 281 | 281 | // ----- Privates ----- |
| 282 | 282 | |
| 283 | + /** |
|
| 284 | + * @param string $cache_file |
|
| 285 | + */ |
|
| 283 | 286 | function _isRecompileNeeded($cache_file) |
| 284 | 287 | { |
| 285 | 288 | // If there is no cache file, we obviously need to recompile. |
@@ -486,6 +489,9 @@ discard block |
||
| 486 | 489 | return $data; |
| 487 | 490 | } |
| 488 | 491 | |
| 492 | + /** |
|
| 493 | + * @param string $data |
|
| 494 | + */ |
|
| 489 | 495 | function _unchunk($data) |
| 490 | 496 | { |
| 491 | 497 | $fp = 0; |
@@ -502,6 +508,9 @@ discard block |
||
| 502 | 508 | return $outData; |
| 503 | 509 | } |
| 504 | 510 | |
| 511 | + /** |
|
| 512 | + * @param string $data |
|
| 513 | + */ |
|
| 505 | 514 | function _parseXml($data) |
| 506 | 515 | { |
| 507 | 516 | $xml = new SimpleXMLElement($data); |
@@ -509,6 +518,9 @@ discard block |
||
| 509 | 518 | return $this->_parseXmlHelper($xml); |
| 510 | 519 | } |
| 511 | 520 | |
| 521 | + /** |
|
| 522 | + * @param SimpleXMLElement $xml |
|
| 523 | + */ |
|
| 512 | 524 | function _parseXmlHelper($xml) |
| 513 | 525 | { |
| 514 | 526 | $tree = null; |
@@ -118,6 +118,10 @@ discard block |
||
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | // apply all parsing routines |
| 121 | + |
|
| 122 | + /** |
|
| 123 | + * @param string $script |
|
| 124 | + */ |
|
| 121 | 125 | private function _pack($script) |
| 122 | 126 | { |
| 123 | 127 | for ($i = 0; isset($this->_parsers[$i]); $i++) { |
@@ -130,6 +134,9 @@ discard block |
||
| 130 | 134 | // keep a list of parsing functions, they'll be executed all at once |
| 131 | 135 | private $_parsers = []; |
| 132 | 136 | |
| 137 | + /** |
|
| 138 | + * @param string $parser |
|
| 139 | + */ |
|
| 133 | 140 | private function _addParser($parser) |
| 134 | 141 | { |
| 135 | 142 | $this->_parsers[] = $parser; |
@@ -225,6 +232,10 @@ discard block |
||
| 225 | 232 | } |
| 226 | 233 | } |
| 227 | 234 | |
| 235 | + /** |
|
| 236 | + * @param string $regexp |
|
| 237 | + * @param string $encode |
|
| 238 | + */ |
|
| 228 | 239 | private function _analyze($script, $regexp, $encode) |
| 229 | 240 | { |
| 230 | 241 | // analyse |
@@ -407,6 +418,10 @@ discard block |
||
| 407 | 418 | } |
| 408 | 419 | |
| 409 | 420 | // mmm.. ..which one do i need ?? |
| 421 | + |
|
| 422 | + /** |
|
| 423 | + * @param integer $ascii |
|
| 424 | + */ |
|
| 410 | 425 | private function _getEncoder($ascii) |
| 411 | 426 | { |
| 412 | 427 | return $ascii > 10 ? $ascii > 36 ? $ascii > 62 ? |
@@ -456,6 +471,9 @@ discard block |
||
| 456 | 471 | return $res . chr(($charCode % $this->_encoding) + 161); |
| 457 | 472 | } |
| 458 | 473 | |
| 474 | + /** |
|
| 475 | + * @param string $string |
|
| 476 | + */ |
|
| 459 | 477 | private function _safeRegExp($string) |
| 460 | 478 | { |
| 461 | 479 | return '/' . preg_replace('/\$/', '\\\$', $string) . '/'; |
@@ -487,6 +505,9 @@ discard block |
||
| 487 | 505 | return '\x' . ((string)dechex(ord($match))); |
| 488 | 506 | } |
| 489 | 507 | |
| 508 | + /** |
|
| 509 | + * @param string $aName |
|
| 510 | + */ |
|
| 490 | 511 | private function _getJSFunction($aName) |
| 491 | 512 | { |
| 492 | 513 | if (defined('self::JSFUNCTION' . $aName)) { |
@@ -611,6 +632,9 @@ discard block |
||
| 611 | 632 | private $QUOTE = '/\'/'; |
| 612 | 633 | private $DELETED = '/\\x01[^\\x01]*\\x01/';//g |
| 613 | 634 | |
| 635 | + /** |
|
| 636 | + * @param string $expression |
|
| 637 | + */ |
|
| 614 | 638 | public function add($expression, $replacement = '') |
| 615 | 639 | { |
| 616 | 640 | // count the number of sub-expressions |
@@ -761,6 +785,10 @@ discard block |
||
| 761 | 785 | private $buffer; |
| 762 | 786 | |
| 763 | 787 | // encode escaped characters |
| 788 | + |
|
| 789 | + /** |
|
| 790 | + * @param string $escapeChar |
|
| 791 | + */ |
|
| 764 | 792 | private function _escape($string, $escapeChar) |
| 765 | 793 | { |
| 766 | 794 | if ($escapeChar) { |
@@ -784,6 +812,10 @@ discard block |
||
| 784 | 812 | } |
| 785 | 813 | |
| 786 | 814 | // decode escaped characters |
| 815 | + |
|
| 816 | + /** |
|
| 817 | + * @param string $escapeChar |
|
| 818 | + */ |
|
| 787 | 819 | private function _unescape($string, $escapeChar) |
| 788 | 820 | { |
| 789 | 821 | if ($escapeChar) { |
@@ -815,6 +847,11 @@ discard block |
||
| 815 | 847 | return $this->buffer['escapeChar'] . $temp; |
| 816 | 848 | } |
| 817 | 849 | |
| 850 | + /** |
|
| 851 | + * @param string $string |
|
| 852 | + * |
|
| 853 | + * @return string |
|
| 854 | + */ |
|
| 818 | 855 | private function _internalEscape($string) |
| 819 | 856 | { |
| 820 | 857 | return preg_replace($this->ESCAPE, '', $string); |
@@ -127,6 +127,9 @@ |
||
| 127 | 127 | Ajde_Cache::getInstance()->updateHash($this->hash()); |
| 128 | 128 | } |
| 129 | 129 | |
| 130 | + /** |
|
| 131 | + * @param string $name |
|
| 132 | + */ |
|
| 130 | 133 | public function setModel($name, $object) |
| 131 | 134 | { |
| 132 | 135 | $this->set($name, serialize($object)); |