/** * Helper function for parsing Toml strings * or files. * * @param string $toml Specifies the Toml * formatted String or * the path to a Toml file * to be parsed. */ function parse($toml) { if (!is_string($toml)) { throw new \InvalidArgumentException('Please specify a Toml formatted String or a file path to a Toml document'); } $path = pathinfo($toml); if (isset($path['extension']) && strtolower($path['extension']) == 'toml') { return Toml::parseFile($toml); } return Toml::parse($toml); }
<?php require "../src/Toml.php"; Toml::parseFile('example.toml');
My interests include technology, computers, programming, music, video games, graphic design and automotive. I do have more interests, but the ones I listed are what I mostly spend my free time on. Since the CST program, my interest in programming has increased significantly. It's an activity I really enjoy doing. Programming gives me a sense to express creativity, thought process and control.<br /> <br /> My current strengths and knowledge with programming are Web Development, Graphic Design, Databases, Object-Oriented and Imparitive Programming. There are lots of areas that I wish to explore like Operating Systems, Language Design, Functional Programming, etc but I do find those areas quite intimidating at my current level. As I spend more time reading, experimenting and exploring new topics I have little or no knowledge in, it becomes a matter of applying myself to spend the time in learning those topics. I would love to learn everything I can, but there's so much knowledge out there, it can be difficult to focus on one topic for awhile. It's not a matter of getting bored with one topic and moving on, but since there's so much to learn, it can be overwhelming. In the long run, the knowledge I gain will be beneficial in my future endeavors.</p> </section> <section id="education" class="container"> <h2>Education</h2> <h3>Camosun College: 2013 - 2015</h3> <h4>Computer Systems Techology</h4> <p><span style="font-size:20px;">Courses Completed:</span></p> <div id="courses"> <?php $courses = Toml::parseFile('share/courses.toml'); foreach ($courses['courses'] as $key => $value) { echo "<p>{$key}: {$value}</p>"; } ?> </div> </section> <section id="languages" class="container"> <h2>Programming Languages</h2> <div class=""> <ul> <li class="head">PHP</li>