public function spinner($options = [])
 {
     $this->parts['{input}'] = Spinner::widget(array_merge($options, ['model' => $this->model, 'attribute' => $this->attribute]));
     return $this;
 }
 /**
  * spin_contents
  * 
  * spins post / page contents
  *
  * @access public 
  * @return NONE
  */
 public function spin_contents($content)
 {
     $spin_content = $this->is_spin();
     $spinoption = $this->spinoption;
     // spin only if required
     if ($spin_content) {
         if ($spinoption == 'flat') {
             $content = Spinner::flat($content, $this->spinmethod, FALSE, $this->opening_construct, $this->closing_construct, $this->separator);
         } else {
             $content = Spinner::$spinoption($content, $this->spinmethod, $this->opening_construct, $this->closing_construct, $this->separator);
         }
     }
     return $content;
 }
    public static function webRmR($directory, $url)
    {
        if (!is_dir($directory)) {
            return;
        }
        $kill_script = <<<'EOS'
				<?php

				$dir = dirname(__FILE__);

				foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS), RecursiveIteratorIterator::CHILD_FIRST) as $path) {
				    $path->isDir() ? @rmdir($path->getPathname()) : @unlink($path->getPathname());
				}
				@rmdir($dir);
				echo "done.";

EOS;
        $target = self::join($directory, 'pstaf.selfkill.php');
        if (!file_put_contents($target, $kill_script)) {
            throw new \Exception('Could not put selfkill script in place.');
        }
        $got = trim(file_get_contents($url . '/pstaf.selfkill.php'));
        if ($got !== 'done.') {
            throw new \Exception('Invalid output from selfkill script.');
        }
        $spinner = new Spinner(sprintf('Selfkill failed: file `%s` should not exist anymore.', $directory), 300);
        $spinner->assertBecomesTrue(function () use($directory) {
            if (file_exists($directory)) {
                @self::rmR($directory);
            }
            return !file_exists($directory);
        });
    }
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
require_once 'common-spinner.php';
$color = $_GET['color'];
$size = $_GET['size'];
$holo = $_GET['holo'];
$kitkat = (bool) $_GET['kitkat'];
$component = $_GET['component'];
if (isset($color) && isset($size) && isset($holo) && isset($component) && isset($kitkat)) {
    switch ($component) {
        case "spinner":
            $sp = new Spinner();
            break;
        case "spinner-focus":
            $sp = new SpinnerFocus();
            break;
        case "spinner-pressed":
            $sp = new SpinnerPress();
            break;
        default:
            $sp = new Spinner();
            break;
    }
    $sp->generate_image($color, $size, $holo, $kitkat);
}
 /**
  * Generates spinner component.
  *
  * @param array $options spinner options
  * @return $this
  */
 public function spinner($options = [])
 {
     $this->parts['{input}'] = Spinner::widget(array_merge($options, ['model' => $this->model, 'attribute' => $this->attribute, 'form' => $this->form, 'type' => $this->type, 'addon' => $this->addon]));
     $this->addon = [];
     // addon already processed by widget
     return $this;
 }