src/php/Arbit/Periodic/Command/FileSystem/Remove.php
public function run( XML\Node $configuration, Logger $logger )
    {
        if ( !isset( $configuration->path ) )
        {
            $logger->log( 'No path provided.', Logger::ERROR );
            return Executor::ERROR;
        }
        $path = (string) $configuration->path;

        $pattern = null;
        if ( isset( $configuration->pattern ) )
        {
            $pattern = $this->compilePattern( (string) $configuration->pattern );
        }

        $this->removeRecursive( $path, $pattern, $logger );
        return Executor::SUCCESS;
    }
public function run( XML\Node $configuration, Logger $logger )
    {
        if ( !isset( $configuration->path ) )
        {
            $logger->log( 'No path provided.', Logger::ERROR );
            return Executor::ERROR;
        }
        $path = (string) $configuration->path;

        $pattern = null;
        if ( isset( $configuration->pattern ) )
        {
            $pattern = $this->compilePattern( (string) $configuration->pattern );
        }

        $this->removeRecursive( $path, $pattern, $logger );
        return Executor::SUCCESS;
    }
public function run ( XML \ Node $ configuration , Logger $ logger ) { if ( ! isset ( $ configuration -> path ) ) { $ logger -> log ( 'No path provided.' , Logger :: ERROR ) ; return Executor :: ERROR ; } $ path = ( string ) $ configuration -> path ; $ pattern = null ; if ( isset ( $ configuration -> pattern ) ) { $ pattern = $ this -> compilePattern ( ( string ) $ configuration -> pattern ) ; } $ this -> removeRecursive ( $ path , $ pattern , $ logger ) ; return Executor :: SUCCESS ; }
Run command

Execute the actual bits.

Should return one of the status constant values, defined as class
constants in Executor.

@param XML\Node $configuration
@param Logger $logger
@return int
Run command