Clear routes.

@param string $remove

@return mixed
511904
private function clearRoutes($remove)
    {
        $path = config('amranidev.config.routes');
        $lines = file($path, FILE_IGNORE_NEW_LINES);

        foreach (array_filter($lines, function ($line) use ($remove) {
            return strstr($line, $remove);
        }) as $key => $line) {
            unset($lines[$key]);
        }

        return file_put_contents($path, implode("\n", array_values($lines)));
    }
528189
public function remove($routes)
    {
        $manager = Yii::$app->getAuthManager();
        foreach ($routes as $route) {
            try {
                $item = $manager->createPermission('/' . trim($route, '/'));
                $manager->remove($item);
            } catch (Exception $exc) {
                Yii::error($exc->getMessage(), __METHOD__);
            }
        }
        Helper::invalidate();
    }
411606
public function clearStatCache($all = false)
    {
        if ($all === false && version_compare(PHP_VERSION, '5.3.0') >= 0) {
            return clearstatcache(true, $this->path);
        }

        return clearstatcache();
    }
1118261
public function clear($regionName = null) {
        $path = $this->getPath($regionName);
        $result = count(glob($path . DIRECTORY_SEPARATOR . '*.cache'));

        array_map('unlink', glob($path . DIRECTORY_SEPARATOR . '*.cache'));
        array_map('unlink', glob($path . DIRECTORY_SEPARATOR . '*.policy'));

        return $result;
    }
606887
public function getAll($remove = true)
    {
        $output = $this->messages;
        if (true === $remove) {
            $this->clear();
        }

        return $output;
    }
189736
public function remove($key)
	{
		if(array_key_exists($key, $this->map))
		{
			$tmp = $this->map[$key]; 
			unset($this->map[$key]);
			return $tmp;
		}
		else
			return NULL;
	}
855448
private function clear($action)
    {
        if ($action == 'all') {
            $this->unlinks($this->setting->getVarDirectory().'/view/*/*');
            foreach (glob($this->setting->getVarDirectory().'/view/*') as $dirname) {
                @rmdir($dirname);
            }

            $this->unlinks($this->setting->getVarDirectory().'/cache/*');
            $this->unlinks($this->setting->getVarDirectory().'/session/*');
            $this->unlinks($this->setting->getVarDirectory().'/logs/*');

            return;
        }

        if ($action == 'view') {
            $this->unlinks($this->setting->getVarDirectory().'/view/*/*');

            foreach (glob($this->setting->getVarDirectory().'/view/*') as $dirname) {
                @rmdir($dirname);
            }

            return;
        }

        if ($action == 'cache') {
            $this->unlinks($this->setting->getVarDirectory().'/cache/*');

            return;
        }

        if ($action == 'session') {
            $this->unlinks($this->setting->getVarDirectory().'/session/*');

            return;
        }

        if ($action == 'log') {
            $this->unlinks($this->setting->getVarDirectory().'/logs/*');

            return;
        }
    }
97552
public function remove($index)
	{
		$value = $this->opt($index);
		unset($this->map[$index]);
		
		return $value;
	}
383705
private function cleanup($bind)
    {
        if (!is_array($bind)) {
            if (!empty($bind))
                $bind = array($bind);
            else
                $bind = array();
        }
        return $bind;
    }
1165925
public function filterRemoved($removed = false) {
        $model = new $this->owner->modelClass();

        return $this->owner->where($model->fullTrashAttribute($removed));
        //return $this->owner;
    }
1371480
public function remove() {
        global $DB;

        if ($this->id === null) {
            // Nothing to delete - this tour has not been persisted.
            return null;
        }

        // Delete all steps associated with this tour.
        // Note, although they are currently just DB records, there may be other components in the future.
        foreach ($this->get_steps() as $step) {
            $step->remove();
        }

        // Remove the configuration for the tour.
        $DB->delete_records('tool_usertours_tours', array('id' => $this->id));

        helper::reset_tour_sortorder();

        return null;
    }
97122
public function remove(array $params)
    {
        $key = array_get($params, 'key');
        $member = array_get($params, 'member');

        return $this->getConnection()->zrem($key, $member);
    }
956587
private function cleanRoute()
    {
        $uri = "";
        if(strlen($this->route) > 0 && $this->route != "/") {
            $first = substr($this->route, 0, 1);
            $last = substr($this->route, -1);
            if($first != "/") {
                $uri = "/";
            }
            $uri .= $this->route;
            if($last == "/") {
                $uri = substr($uri, 0, -1);
            }
            
            $this->route = $uri;
        }
    }
627608
public function getFirstAction($remove = true)
    {
        foreach ($this->getArrayCopy() as $key => $item) {

            if ($result = $this->toActionLink($key)) {

                if ($remove) {
                    $this->offsetUnset($key);
                }

                return $result;
            }
        }
    }
1094579
public function remove( $key )
	{
		$uri	= $this->getUriForKey( $key );
		unset( $this->data[$key] );
		return @unlink( $uri );
	}
1359652
protected function clearRemoval($key)
    {
        if (false === $this->willRemove($key)) {
            return $this;
        }
        $key = array_search($key, $this->remove);
        unset($this->remove[$key]);
        $this->remove = array_values($this->remove);
        return $this;
    }
558678
public function clear()
    {
        $result = true;

        foreach (glob("{$this->path}/*.cache") as $filename) {
            if (!unlink($filename)) {
                $result = false;
            }
        }

        return $result;
    }