Lines Matching refs:this

9  * file that was distributed with this source code.
89 $this->client = $client;
90 $this->search = $search;
91 $this->sort = $sort instanceof SortingControl ? $sort : Controls::sort($sort);
92 $this->before = $before;
93 $this->after = $after;
101 * @return $this
105 $this->asPercentage = $asPercentage;
107 return $this;
114 * @return $this
118 $this->offset = $offset;
120 return $this;
127 * @return $this
131 $this->offset = ($this->offset - $size < 0) ? 0 : $this->offset - $size;
133 return $this;
140 * @return $this
144 $this->offset = ($this->asPercentage && ($this->offset + $size) > 100) ? 100 : $this->offset + $size;
146 return $this;
157 return $this->startAt($position);
164 * @return $this
168 $this->after = $after;
170 return $this;
177 * @return $this
181 $this->before = $before;
183 return $this;
193 return ($this->control !== null) ? $this->control->getOffset() : null;
203 return ($this->control !== null) ? $this->control->getCount() : null;
207 * Get the current position in the list. When as percentage was specified this will be expressed as a percentage.
214 $control = $this->control;
220 if ($this->asPercentage) {
234 if ($this->control === null) {
238 $control = $this->control;
239 if ((((int) $control->getOffset() + $this->after) >= (int) $control->getCount())) {
253 if ($this->control === null) {
256 $control = $this->control;
257 if ($this->before !== 0 && ((int) $control->getOffset() - $this->before) <= 1) {
271 return $this->send();
280 $contextId = ($this->control !== null) ? $this->control->getContextId() : null;
281 $message = $this->client->sendAndReceive($this->search, $this->createVlvControl($contextId), $this->sort);
286 $this->control = $control;
298 if ($this->filter !== null) {
299 return Controls::vlvFilter($this->before, $this->after, $this->filter, $contextId);
302 $count = ($this->control !== null) ? (int) $this->control->getCount() : 0;
306 if ($this->control === null && $this->asPercentage) {
310 $offset = $this->offset;
312 if ($this->asPercentage && $this->offset > 100) {
314 } elseif ($this->asPercentage && $this->offset < 0) {
318 if ($this->asPercentage && $this->control !== null) {
319 $offset = (int) round(((int) $this->control->getCount() / 100) * $offset);
322 return Controls::vlv($this->before, $this->after, $offset, $count, $contextId);