DataSift\Storyplayer\Cli\PlayStory_Command::addStoryFromFile PHP Method

addStoryFromFile() protected method

------------------------------------------------------------------
protected addStoryFromFile ( Phix_Project\CliEngine $engine, DataSift\Storyplayer\Injectables $injectables, $storyFile )
$engine Phix_Project\CliEngine
$injectables DataSift\Storyplayer\Injectables
    protected function addStoryFromFile(CliEngine $engine, Injectables $injectables, $storyFile)
    {
        // warn the user if the story file doesn't end in 'Story.php'
        //
        // this is because Storyplayer will ignore the file if you
        // point Storyplayer at a folder instead of a specific file
        if (substr($storyFile, -9) != 'Story.php') {
            $msg = "your story should end in 'Story.php', but it does not" . PHP_EOL;
            $this->output->logCliWarning($msg);
        }
        // these are the players we want to execute for the story
        $return = [new Story_Player($storyFile, $injectables)];
        // all done
        return $return;
    }