<?php


namespace Craft;

class AssetIndexerVariable
{
    /**
     * Whatever you want to output to a Twig tempate can go into a Variable method. You can have as many variable
     * functions as you want.  From any Twig template, call it like this:
     *
     *     {{ craft.assetIndexer.exampleVariable }}
     *
     * Or, if your variable requires input from Twig:
     *
     *     {{ craft.assetIndexer.exampleVariable(twigValue) }}
     */
    public function AssetSources()
    {
	    $response = craft()->assetIndexer->getAssetSources();
		return $response;
    }
    
    public function cpTrigger()
    {
	    return craft()->config->get('cpTrigger');
    }
    
    public function IndexAssets($folder = null, $start = null)
    {
		$response = craft()->assetIndexer->getAssets($folder, $start);
		return $response;
    }
    
    public function IndexFiles($folder = null, $start = null)
    {
		$response = craft()->assetIndexer->getFiles($folder, $start);
		return $response;
    }
}