Call the Realtons surface.

@return null
173144
private static function relations()
    {
        $files = ['OneToOne', 'OneToMany', 'ManyToMany', 'BelongsTo'];
        $folder = static::$root.'MVC/Relations'.'/';

        self::call($files, $folder);

        $files = ['ManyRelationException', 'ModelNotFindedException'];
        $folder = static::$root.'MVC/Relations/Exceptions'.'/';

        self::call($files, $folder);
    }
1202648
final public function current()
    {
        if (!$this->valid()) {

            return null;
        }

        /*
         * Multiple calls to current() should be idempotent
         */
        if ($this->_lastPositionExecuted !== $this->_position) {

            $this->runToNextYieldStatement();
        }

        return $this->valid() ? $this->getLastYieldedValue() : null;
    }
1250828
public function call()
    {
        switch ( Request::input( 'do' , false) ) {
            case 'init':
                return $this->init();
            case 'finish':
                return $this->finish();
            case 'notify':
                return $this->notify();
        }
    }
1119484
private function callModel()
    {
        $name = $this->getModelName();

        $resourceString = $this->getResourceOnly();
        $resourceStringLength = strlen($this->getResourceOnly());

        if ($resourceStringLength > 18) {
            $ans = $this->confirm("Your resource {$resourceString} may have too many characters to use for many to many relationships. The length is {$resourceStringLength}. Continue?");
            if ($ans === false) {
                echo "generate:resource cancelled!";
                die;
            }
        }

        if ($this->confirm("Create a $name model?")) {
            $this->callCommandFile('model');
        }
    }
337186
public function run()
    {
        $header = $this->rec->header();
        $mapData = $header->mapData;
        $mapSize = count($mapData);
        $image = $this->imageManager->canvas($mapSize, $mapSize);
        $p = $this->rec->getResourcePack();

        foreach ($mapData as $y => $row) {
            foreach ($row as $x => $tile) {
                $variation = 1;
                if ($this->showElevation) {
                    if (isset($mapData[$y + 1][$x + 1])) {
                        $bottomRight = $mapData[$y + 1][$x + 1];
                        if ($bottomRight->elevation < $tile->elevation) {
                            $variation = 0;
                        } else if ($bottomRight->elevation > $tile->elevation) {
                            $variation = 2;
                        }
                    }
                }
                $color = $p->getTerrainColor($tile->terrain, $variation);
                if (!is_null($color)) {
                    $this->fastPixel($image, $x, $y, $color);
                } else {
                    throw new \Exception(sprintf('Unknown terrain ID \'%d\'', $tile->terrain));
                }
            }
        }

        $gaiaObjects = $this->sortObjects($header->playerInfo->gaiaObjects);

        foreach ($gaiaObjects as $obj) {
            $color = $p->getUnitColor($obj->id);
            list ($x, $y) = $obj->position;
            $image->rectangle($x - 1, $y - 1, $x + 1, $y + 1, function ($shape) use ($color) {
                $shape->background($color);
            });
        }

        if ($this->showPlayerUnits) {
            foreach ($header->playerInfo->playerObjects as $object) {
                if ($object->owner->index < 0) {
                    continue;
                }
                $color = $object->owner->color();
                list ($x, $y) = $object->position;
                $image->rectangle($x - 1, $y - 1, $x + 1, $y + 1, function ($shape) use ($color) {
                    $shape->background($color);
                });
            }
        }

        if ($this->showPositions) {
            foreach ($header->players as $player) {
                if ($player->isCooping || $player->isSpectator()) {
                    continue;
                }

                $color = $player->color();
                list ($x, $y) = $player->position();
                $image->circle(18, $x, $y, function ($shape) use ($color) {
                    $shape->border(1, $color);
                });
                $image->circle(8, $x, $y, function ($shape) use ($color) {
                    $shape->background($color);
                });
            }
        }

        return $image->rotate(45, [0, 0, 0, 0]);
    }
561816
private function _call()
    {

        // Time this
        $t = new Timer('apcaccess Extension');

        // Deal with calling it
        try {
            $result = $this->_CallExt->exec('apcaccess');
        } catch (Exception $e) {
            // messed up somehow
            Errors::add('apcaccess Extension', $e->getMessage());
            $this->_res = false;

            // Don't bother going any further
            return false;
        }

        // Store them here
        $this->_res = [];

        // Get name
        if (preg_match('/^UPSNAME\s+:\s+(.+)$/m', $result, $m)) {
            $this->_res['name'] = $m[1];
        }

        // Get model
        if (preg_match('/^MODEL\s+:\s+(.+)$/m', $result, $m)) {
            $this->_res['model'] = $m[1];
        }

        // Get battery voltage
        if (preg_match('/^BATTV\s+:\s+(\d+\.\d+)/m', $result, $m)) {
            $this->_res['volts'] = $m[1];
        }

        // Get charge percentage, and get it cool
        if (preg_match('/^BCHARGE\s+:\s+(\d+(?:\.\d+)?)/m', $result, $m)) {
            $charge = (int) $m[1];
            $this->_res['charge'] = '
					<div class="bar_chart">
						<div class="bar_inner" style="width: '.(int) $charge.'%;">
							<div class="bar_text">
								'.($charge ? $charge.'%' : '?').'
							</div>
						</div>
					</div>
			';
        }

        // Get time remaning
        if (preg_match('/^TIMELEFT\s+:\s+([\d\.]+)/m', $result, $m)) {
            $this->_res['time_left'] = Common::secondsConvert($m[1] * 60);
        }

        // Get status
        if (preg_match('/^STATUS\s+:\s+([A-Z]+)/m', $result, $m)) {
            $this->_res['status'] = $m[1] == 'ONBATT' ? 'On Battery' : ucfirst(strtolower($m[1]));
        }

        // Load percentage looking cool
        if (preg_match('/^LOADPCT\s+:\s+(\d+\.\d+)/m', $result, $m)) {
            $load = (int) $m[1];
            $this->_res['load'] = '
					<div class="bar_chart">
						<div class="bar_inner" style="width: '.(int) $load.'%;">
							<div class="bar_text">
								'.($load ? $load.'%' : '?').'
							</div>
						</div>
					</div>
			';
        }

        // Attempt getting wattage
        if (isset($load) && preg_match('/^NOMPOWER\s+:\s+(\d+)/m', $result, $m)) {
            $watts = (int) $m['1'];
            $this->_res['watts_used'] = $load * round($watts / 100);
        } else {
            $this->_res['watts_used'] = false;
        }

        // Apparent success
        return true;
    }
297472
public function actionView()
    {
        $path = $this->getPublicPath();
        if (preg_match('@^asset[a-zA-Z0-9]{10}/.*$@', $path)) {
            $path = '/'.substr($path, 16);
        }
        $realPath = \Staq::App()->getFilePath('/public' . $path);
        if (
            empty($realPath) ||
            is_dir($realPath) ||
            \UString::isEndWith($realPath, '.php') /* TODO: Add to settings */
        ) {
            return NULL;
        }
        $this->renderStaticFile($realPath);
        return TRUE;
    }
706128
public function run()
    {
        if (empty($this->items)) {
            return null;
        }
        $this->renderLinks();
        $this->renderTemplate();
        $this->registerClientScript();
    }
306222
public function firstCall(): Call
    {
        if (isset($this->calls[0])) {
            return $this->callVerifierFactory->fromCall($this->calls[0]);
        }

        throw new UndefinedCallException(0);
    }
1030681
public function call()
    {
        $app = $this->app;

        $config = $app->config('bono.theme');
        $Theme = $config['class'];

        if (isset($Theme)) {
            $app->theme = new $Theme($app, $config);
        }

        $this->next->call();

        $response = $app->response;
        $template = $response->template();

        if ($response->getStatus() == 200) {
            $app->render($template, $response->data());
        }
    }
8069
public function callMe()
    {
        $output = $this->dispatchStartEvent();

        $refProps = array();
        /** @var \Brainworxx\Krexx\Service\Reflection\ReflectionClass $ref */
        $ref = $this->parameters[static::PARAM_REF];
        // We need to keep the original reference intact.
        $reflectionClass = $ref;

        // The main problem here is, that you only get the private properties of
        // the current class, but not the inherited private properties.
        // We need to get all parent classes and then poll them for private
        // properties to get the whole picture.
        do {
            $refProps = array_merge($refProps, $reflectionClass->getProperties(\ReflectionProperty::IS_PRIVATE));
            // And now for the parent class.
            $reflectionClass = $reflectionClass->getParentClass();
        } while (is_object($reflectionClass));

        if (empty($refProps) === true) {
            return $output;
        }

        usort($refProps, array($this, 'reflectionSorting'));

        return $output .
            $this->getReflectionPropertiesData(
                $refProps,
                $ref,
                'Private properties'
            );
    }
911246
public function setLandscape() {
		$this->_orientation = 'landscape';
		$this->_pageSizeW = $this->_defaultPageSizeH;
		$this->_pageSizeH = $this->_defaultPageSizeW;
	}
343288
@Override
    public void load()
    {
        if (surface == null)
        {
            surface = Graphics.createImageBuffer(map.getInTileWidth(), map.getInTileHeight(), ColorRgba.TRANSPARENT);
        }
    }
208801
private function callController()
    {
        $name = $this->getResourceControllerName();

        if ($this->confirm("Create a controller ($name) for the $this->resource resource?")) {
            $arg = $this->getArgumentResource();
            $name = substr_replace($arg, str_plural($this->resource),
                strrpos($arg, $this->resource), strlen($this->resource));

            if ($this->repositoryContract) {
                $this->callCommandFile('controller', $name, 'controller_repository');
            }
            else {
                // if admin - update stub
                if (!str_contains($name, 'admin.')) {
                    $this->callCommandFile('controller', $name, 'controller');
                }
                else {
                    $this->callCommandFile('controller', $name, 'controller_admin');
                }
            }
        }
    }
696042
public function call_static() {
		$args  = func_get_args();
		$class = array_shift( $args );
		$name  = array_shift( $args );

		return call_user_func_array( [$class, $name], $args );
	}
1036008
protected function call()
    {
        $curl = curl_init();

        curl_setopt_array($curl, array(
            CURLOPT_RETURNTRANSFER      => 1,
            CURLOPT_URL                 => $this->requestUrl[$this->format].$this->param,
            CURLOPT_SSL_VERIFYPEER      => false,
            CURLOPT_FAILONERROR         => true,
        ));

        $request = curl_exec($curl);

        if (empty($request)) {
            throw new \RuntimeException('cURL request retuened following error: '.curl_error($curl) );
        }

        curl_close($curl);

        return $request;
    }
99349
protected static function __getRealClassName()
    {
        if(!isset(TBeanRealClass::$realClassNames[static::class]))
        {
            $ref = new \ReflectionClass(static::class);
            if($ref->implementsInterface(IBean::class))
            {
                TBeanRealClass::$realClassNames[static::class] = $ref->getParentClass()->getName();
            }
            else
            {
                TBeanRealClass::$realClassNames[static::class] = $ref->getName();
            }
        }
        return TBeanRealClass::$realClassNames[static::class];
    }