src/Manipulator/ManipulatorFactory.php
public function create($operation)
    {
        if (!is_string($operation)) {
            throw new \LogicException("Provided manipulation name {$operation} is not a string!");
        }

        $operation = str_replace('-', ' ', $operation);
        $operation = strtolower($operation);
        $operation = ucwords($operation);
        $operation = str_replace(' ', '', $operation);

        $className = "Todstoychev\\Icr\\Manipulator\\" . $operation;

        if (!class_exists($className)) {
            throw new IcrRuntimeException("Operation {$operation} does not exists!");
        }

        return new $className($this->box, $this->point);
    }
public function create($operation)
    {
        if (!is_string($operation)) {
            throw new \LogicException("Provided manipulation name {$operation} is not a string!");
        }

        $operation = str_replace('-', ' ', $operation);
        $operation = strtolower($operation);
        $operation = ucwords($operation);
        $operation = str_replace(' ', '', $operation);

        $className = "Todstoychev\\Icr\\Manipulator\\" . $operation;

        if (!class_exists($className)) {
            throw new IcrRuntimeException("Operation {$operation} does not exists!");
        }

        return new $className($this->box, $this->point);
    }
public function create ( $ operation ) { if ( ! is_string ( $ operation ) ) { throw new \ LogicException ( "Provided manipulation name {$operation} is not a string!" ) ; } $ operation = str_replace ( '-' , ' ' , $ operation ) ; $ operation = strtolower ( $ operation ) ; $ operation = ucwords ( $ operation ) ; $ operation = str_replace ( ' ' , '' , $ operation ) ; $ className = "Todstoychev\\Icr\\Manipulator\\" . $ operation ; if ( ! class_exists ( $ className ) ) { throw new IcrRuntimeException ( "Operation {$operation} does not exists!" ) ; } return new $ className ( $ this -> box , $ this -> point ) ; }
Creates manipulation instance

@param string $operation Operation name

@return mixed
Creates manipulation instance